Jonas Jensen
3236cbd83e
C++: Test the AST wrapper for IR GVN
...
Out of our 3 GVN libraries, the one we actually use in production didn't
have tests -- except indirectly through `diff_ir_expr.ql`.
2020-12-21 08:21:02 +01:00
Mathias Vorreiter Pedersen
4c3a26fea8
Revert "Merge pull request #4558 from rdmarsh2/rdmarsh2/cpp/remove-initialize-nonlocal"
...
This reverts commit 08efd7fbd9 , reversing
changes made to cb8c5e8cca .
2020-11-25 15:51:52 +01:00
Robert Marsh
693626e460
C++: accept value numbering test changes
2020-11-18 11:00:31 -08:00
Robert Marsh
f917cf826f
C++: accept test output
2020-11-02 13:59:23 -08:00
Dave Bartolomeo
a80c6fbf97
C++: Print target variable name for Load and Store, if known
...
Now that we've started printing the targets of `Call` instructions in the IR dumps, I figured I might as well print the names of the variable being loaded or stored as well. We could potentially extend this to match fields, array elements, etc., but that's quite a bit more work.
2020-10-17 14:21:27 -04:00
Dave Bartolomeo
6a6eadcf50
C++: Print static call target for Call instruction in dumps
2020-10-16 11:53:27 -04:00
Jonas Jensen
9153f568be
C++: Accept test results with location fixes
2020-05-28 09:42:49 +02:00
Dave Bartolomeo
42c659b8f2
C++/C#: Remove UnmodeledDefinition instruction
2020-05-18 15:08:50 -04:00
Dave Bartolomeo
5d3f25211d
C++/C#: Remove UnmodeledUse instruction
2020-05-13 01:06:40 -04:00
Robert Marsh
9008084b74
Merge pull request #3272 from dbartol/dbartol/DumpFixes
...
C++: A couple of fixes for IR dumps
2020-04-17 11:49:52 -07:00
Dave Bartolomeo
2264ec714f
C++: Better type preservation in getVariableType()
...
`getVariableType()` is used to compute the actual semantic type of a variable from its declared type. That's where we handle pointer and function decay for parameters, and it's also where we handle arrays of unknown bound initialized with an initializer of known bound.
Previously, even if neither of the above situations applied, the type that we returned was the `getUnspecifiedType()` of the variable. This meant that, for example, `const char* p` would be treated as `char *`. This is inconsistent with how we handle types elsewhere in IR construction, where we preserve typedefs and cv-qualifiers when creating the `CppType` of an `IRVariable`, `Instruction`, or `Operand`.
The only visible effect this fix has is to fix the inferred result type for `Phi` instructions for variables affect by this change in `getVariableType()` behavior. Previously, we would see the variable accessed as both `const char*` and as `char*`, so we'd fall back to the canonical pointer type, which is `decltype(nullptr)`. Now, we see the same type for all accesses to the variable, so we use that type as the type of the SSA memory location and as the result type of the `Phi` instruction.
2020-04-15 18:41:24 -04:00
Chris Gavin
4e981d8e70
Merge rc/1.24 into master.
2020-04-14 21:30:29 +01:00
Dave Bartolomeo
279467654e
C++: Make test functions return void
2020-04-14 14:17:56 -04:00
Robert Marsh
c38ccaaab6
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
2020-04-08 12:32:35 -07:00
Mathias Vorreiter Pedersen
c54cddead1
C++: Include PrintValueNumbering in testcase
2020-04-03 12:42:06 +02:00
Robert Marsh
25f3f67c4a
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
...
Fixes test conflicts and reveals a bug in parameter handling
2020-03-31 12:54:00 -07:00
Dave Bartolomeo
bebf89fed5
C++: Accept test diffs
...
All changes look like real improvements.
2020-03-23 17:20:19 -04:00
Robert Marsh
4333fe7905
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
2020-02-26 13:15:27 -08:00
Geoffrey White
c014ca6ed7
C++: Rename some tests for clarity / less emphasis on the AST.
2020-02-19 14:33:57 +00:00
Geoffrey White
3e49e12126
C++ Repair GlobalValueNumbering (AST) test.
2020-02-19 14:28:46 +00:00
Mathias Vorreiter Pedersen
3a05a82c1d
C++: Accept output
2020-02-19 10:35:03 +01:00
Mathias Vorreiter Pedersen
246ef694f6
Merge branch 'master' into gvn-use-impl
2020-02-19 10:29:46 +01:00
Robert Marsh
adfe5f30a1
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
2020-02-18 08:42:27 -08:00
Mathias Vorreiter Pedersen
4cad5549ee
C++: Directly import AST GVN module in tests
2020-02-18 12:21:14 +01:00
Jonas Jensen
a59c0facee
C++: Accept test changes for IR libs
...
This is for the tests in the ql repo. There are also changed tests in
the internal repo.
2020-02-15 21:12:20 +01:00
Robert Marsh
d1d19a7446
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
...
Update test expectations
2020-02-07 12:24:05 -08:00
Mathias Vorreiter Pedersen
538c2b205d
C++: Accept output
2020-02-06 18:44:08 +01:00
Mathias Vorreiter Pedersen
23ca363b87
C++: Formatting
2020-02-06 15:53:22 +01:00
Mathias Vorreiter Pedersen
98969e3bf9
C++: Accepted ir_gvn output after toString change
2020-02-06 15:53:22 +01:00
Mathias Vorreiter Pedersen
0d181a7101
C++: Add tests and accept output
2020-02-06 15:48:08 +01:00
Mathias Vorreiter Pedersen
ba395cf11a
C++: Update test annotations and accept output
2020-02-06 09:26:33 +01:00
Mathias Vorreiter Pedersen
cfcf087d3c
C++: Add comment explaining buggy value number
2020-02-06 09:26:33 +01:00
Mathias Vorreiter Pedersen
5e5bd92cba
C++: Accept output
2020-02-06 09:26:33 +01:00
Mathias Vorreiter Pedersen
687dcb7ad1
C++: Add testcase demonstrating unexpectly different value numbers
2020-02-06 09:21:42 +01:00
Dave Bartolomeo
4362bdb626
C++: Accept new test output
2020-02-05 10:56:40 -07:00
Dave Bartolomeo
fd2cafa95f
C++: Accept GVN test output
2020-01-31 13:36:14 -07:00
Dave Bartolomeo
dda32359fa
C++: Accept IR dump test results changes due to new alias analysis
2020-01-28 10:58:05 -07:00
Robert Marsh
e209ed961a
Merge branch 'master' into rdmarsh/cpp/ir-callee-side-effects
2019-12-17 15:11:02 -08:00
Robert Marsh
60b384a6e5
C++/C#: use line numbers for instruction IDs
...
This should reduce the number of merge conflicts in the IR tests resulting
from instruction ID changes due to inserting or removing instructions
2019-11-25 18:27:59 -05:00
Robert Marsh
facbd32062
Merge branch 'master' into rdmarsh/cpp/ir-callee-side-effects
2019-11-14 11:09:13 -08:00
Robert Marsh
2fb1d4d1b1
C++: fix IR return block successors
2019-11-14 10:29:48 -08:00
Jonas Jensen
279fc16b60
C++: ConvertToBase -> ConvertToNonVirtualBase
...
This rename was done with
perl -p -i -e's/ConvertToBase/ConvertToNonVirtualBase/g' **/*.ql* **/*.expected
followed by re-running the affected tests.
2019-11-10 10:35:53 +01:00
Jonas Jensen
76a3db9eed
Merge remote-tracking branch 'upstream/master' into ir-copy-unloaded-result
2019-11-06 15:21:22 +01:00
Robert Marsh
8076156cb1
Merge branch 'master' into rdmarsh/cpp/ir-callee-side-effects
2019-10-28 16:50:34 -07:00
Robert Marsh
120fa6c330
C++: alias fixes for ReturnIndirection
2019-10-28 15:09:35 -07:00
Dave Bartolomeo
f5e320e988
Merge from master
2019-10-25 13:24:19 -07:00
Dave Bartolomeo
1223388ab6
C++: Fix test expectations
2019-10-24 13:54:21 -07:00
Jonas Jensen
11da4a5328
C++: Accept test results for GVN and sign analysis
2019-10-24 15:17:16 +02:00
Robert Marsh
e8dd0227ae
C++: accept test changes
2019-10-22 14:27:43 -07:00
Dave Bartolomeo
63038896f4
C++: Accept test output after changes
2019-10-21 17:06:32 -07:00