Robert Marsh
e2d24a2743
C++: fix comment
2018-09-20 13:07:36 -07:00
Robert Marsh
9011e1381b
C++: handle conversions in IR to AST translation
2018-09-20 12:56:43 -07:00
Robert Marsh
cc97cf9297
C++: add isReachableFromFunctionEntry
2018-09-20 10:06:19 -07:00
Robert Marsh
4c94144089
C++: remove abstract classes in IR
2018-09-20 10:06:18 -07:00
Robert Marsh
755e21d355
C++: improve conversion handling in IRGuards.qll
2018-09-20 10:06:18 -07:00
Robert Marsh
e40ce91e7e
C++: document new IR class and predicates
2018-09-20 10:06:18 -07:00
Robert Marsh
d6cea1b203
C++: Add class and predicates to other IR stages
2018-09-20 10:06:17 -07:00
Robert Marsh
b5cd48d819
C++: comments on new classes and predicates
2018-09-20 10:06:17 -07:00
Robert Marsh
0273b20743
C++: make internal classes private
2018-09-20 10:06:17 -07:00
Robert Marsh
ad8f30d2f7
C++: accept test output and add IR guards tests
2018-09-20 10:06:17 -07:00
Robert Marsh
d7e630b3c6
C++: Add IR-based port of Guards library
...
For ease of reviewing, I've checked in the .expected files from the
AST-based guards library. The next commit accepts output for these tests
and adds tests that use getAST rather than the translation layer.
2018-09-20 10:06:16 -07:00
Robert Marsh
4e1a37cd6e
C++: add isStrict to RelationalInstruction
2018-09-20 10:06:16 -07:00
Robert Marsh
27a83e65b2
C++: add RelationalOpcode and RelationalInstruction
2018-09-20 10:06:16 -07:00
Robert Marsh
69962bd06c
Merge pull request #203 from dave-bartolomeo/dave/GVN
...
C++: Initial attempt at IR-based value numbering
2018-09-20 10:00:45 -07:00
Dave Bartolomeo
5a25602c28
C++: Move GVN out of "internal" directory
2018-09-20 08:21:15 -07:00
Dave Bartolomeo
27cee9bd80
C++: Handle inheritance conversions in IR GVN
2018-09-20 08:00:38 -07:00
Dave Bartolomeo
bd156757d3
C++: Remove accidental add of IR.md
2018-09-19 14:26:17 -07:00
Dave Bartolomeo
43f0289f0f
C++: Remove Phi instructions from previous IR generations
...
It turns out that when building aliased SSA IR, we were still keeping around the Phi instructions from unaliased SSA IR. These leftover instructions didn't show up in dumps because they were not assigned to a block. However, when dumping additional instruction properties, they would show up as a top-level node in the dump, without a label.
2018-09-18 11:28:09 -07:00
Jonas Jensen
86fe0ce42e
Merge pull request #107 from rdmarsh2/rdmarsh/cpp/HashCons
...
C++: HashCons library
2018-09-18 11:45:26 +02:00
Dave Bartolomeo
46b2c19c66
C++: Initial attempt at IR-based value numbering
2018-09-17 17:19:05 -07:00
Raul Garcia
28050e1415
Change to cpp/overflow-buffer to detect access to an array using a negative index (static, out of range access, lower bound).
2018-09-13 15:44:32 -07:00
semmle-qlci
3d022298dc
Merge pull request #186 from Semmle/rc/1.18
...
Approved by esben-semmle
2018-09-13 12:34:54 +01:00
Jonas Jensen
9fb5fbd995
C++: Restructure UnsafeUseOfStrcat for performance
...
This query gets optimized badly, and it has started timing out when we
run it on our own code base. Most of the evaluation time is spent in an
RA predicate named `#select#cpe#1#f#antijoin_rhs#1`, which takes 1m36s a
Wireshark snapshot.
This restructuring of the code makes the problematic RA predicate go
away.
2018-09-12 09:37:17 +02:00
Dave Bartolomeo
49b8db9631
Merge pull request #180 from jbj/ArrayType-size-docs
...
C++: Document the three predicates for array size
2018-09-11 10:11:45 -07:00
Jonas Jensen
4304a4e1bc
C++: Fix docs copy-paste error
2018-09-11 15:39:44 +02:00
Jonas Jensen
d956bf90ad
C++: Document the three predicates for array size
2018-09-11 15:15:44 +02:00
ian-semmle
628d7b95d9
Merge pull request #178 from jbj/ir-duplicateOperand-perf
...
C++: IR: InstructionSanity::duplicateOperand perf
2018-09-11 12:53:27 +01:00
Jonas Jensen
ecfc53668f
C++: IR: InstructionSanity::duplicateOperand perf
...
The `InstructionSanity::duplicateOperand` predicate used `count` instead
of `strictcount`. The 0-case of this `count` was as large as the
Cartesian product of `Instruction` and `OperandTag`, which made
`duplicateOperand` take forever to compute on large snapshots.
2018-09-11 12:04:27 +02:00
Tom Hvitved
70e713122f
Merge branch 'rc/1.18' into merge-rc
2018-09-11 09:11:03 +02:00
Robert Marsh
0e44bf3c30
C++: Add import for LGTM
2018-09-10 12:22:45 -07:00
Robert Marsh
cb9f1269f9
C++: select example exprs for HashCons portably
...
This makes two changes to how example exprs are selected. Example exprs
are now ordered separately by each piece of the location, rather than by
stringifying their location. Second, UnknownLocations are now ordered
after locations with absolute paths, by using "~" in the lexicographic
comparison of absolute paths. I think this works on both POSIX and
Windows systems, but it's possible I'm missing a way to start an
absolute path with a unicode character.
2018-09-10 12:22:45 -07:00
Robert Marsh
fb8ad9387d
C++: Uniqueness fixes for HashCons
2018-09-10 12:22:45 -07:00
Robert Marsh
166dba288b
C++: accept test output
2018-09-10 12:22:45 -07:00
Robert Marsh
bbafcd9941
C++: typeid and noexcept fixes in HashCons
2018-09-10 12:22:45 -07:00
Robert Marsh
2d098fed98
fix HashCons for typeid of type
2018-09-10 12:22:44 -07:00
Robert Marsh
c42ecfe8f9
C++: Simplify HashCons for new and handle extents
2018-09-10 12:22:44 -07:00
Robert Marsh
9f476e585a
C++: Simplify some code
2018-09-10 12:22:44 -07:00
Robert Marsh
fa9eeea302
C++: remove implicit this handling in HashCons
2018-09-10 12:22:44 -07:00
Robert Marsh
246ae2d7e8
C++: fix performance of argument hash-consing
2018-09-10 12:22:44 -07:00
Robert Marsh
06a3e8fc76
C++: Hashcons for ?:, ExprCall, and weird stuff
2018-09-10 12:22:44 -07:00
Robert Marsh
cfeed30a89
C++: Hashcons tests for ArrayExpr
2018-09-10 12:22:44 -07:00
Robert Marsh
8189798f43
C++: HashCons for throw
2018-09-10 12:22:43 -07:00
Robert Marsh
85cfb0202f
C++: add HashCons for delete expressions
2018-09-10 12:22:43 -07:00
Robert Marsh
752f39b537
C++: initial support for aggregate initializers
2018-09-10 12:22:43 -07:00
Robert Marsh
8f446aa9cc
C++: fix handling of aligned allocators
2018-09-10 12:22:43 -07:00
Robert Marsh
5549b6fcab
C++: HashCons for new, new[], sizeof, alignof
2018-09-10 12:22:43 -07:00
Robert Marsh
fede8d63d4
C++: respond to PR comments
2018-09-10 12:22:43 -07:00
Robert Marsh
e6314c5f35
C++: add support for enums in HashCons
2018-09-10 12:22:43 -07:00
Robert Marsh
91da02bacf
C++: uniqueness fixes for HashCons
2018-09-10 12:22:42 -07:00
Robert Marsh
3a5eb03055
C++: change floating point value in test
2018-09-10 12:22:42 -07:00