summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2014-08-30 12:48:33 +0000
committerHal Finkel <hfinkel@anl.gov>2014-08-30 12:48:33 +0000
commita3708df41a33f484a88feec5a87937db857ec010 (patch)
tree15606d9b8996f064d2fe87717537c0893855da18 /llvm/lib/CodeGen
parent492e612e01101d92e37f06f95008c28b85d27861 (diff)
downloadbcm5719-llvm-a3708df41a33f484a88feec5a87937db857ec010.tar.gz
bcm5719-llvm-a3708df41a33f484a88feec5a87937db857ec010.zip
Fix AddAliasScopeMetadata to not add scopes when deriving from unknown pointers
The previous implementation of AddAliasScopeMetadata, which adds noalias metadata to preserve noalias parameter attribute information when inlining had a flaw: it would add alias.scope metadata to accesses which might have been derived from pointers other than noalias function parameters. This was incorrect because even some access known not to alias with all noalias function parameters could easily alias with an access derived from some other pointer. Instead, when deriving from some unknown pointer, we cannot add alias.scope metadata at all. This fixes a miscompile of the test-suite's tramp3d-v4. Furthermore, we cannot add alias.scope to functions unless we know they access only argument-derived pointers (currently, we know this only for memory intrinsics). Also, we fix a theoretical problem with using the NoCapture attribute to skip the capture check. This is incorrect (as explained in the comment added), but would not matter in any code generated by Clang because we get only inferred nocapture attributes in Clang-generated IR. This functionality is not yet enabled by default. llvm-svn: 216818
Diffstat (limited to 'llvm/lib/CodeGen')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud