1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/test
Hal Finkel 9779454568 Improve BasicAA CS-CS queries (redux)
This reverts, "r213024 - Revert r212572 "improve BasicAA CS-CS queries", it
causes PR20303." with a fix for the bug in pr20303. As it turned out, the
relevant code was both wrong and over-conservative (because, as with the code
it replaced, it would return the overall ModRef mask even if just Ref had been
implied by the argument aliasing results). Hopefully, this correctly fixes both
problems.

Thanks to Nick Lewycky for reducing the test case for pr20303 (which I've
cleaned up a little and added in DSE's test directory). The BasicAA test has
also been updated to check for this error.

Original commit message:

BasicAA contains knowledge of certain intrinsics, such as memcpy and memset,
and uses that information to form more-accurate answers to CallSite vs. Loc
ModRef queries. Unfortunately, it did not use this information when answering
CallSite vs. CallSite queries.

Generically, when an intrinsic takes one or more pointers and the intrinsic is
marked only to read/write from its arguments, the offset/size is unknown. As a
result, the generic code that answers CallSite vs. CallSite (and CallSite vs.
Loc) queries in AA uses UnknownSize when forming Locs from an intrinsic's
arguments. While BasicAA's CallSite vs. Loc override could use more-accurate
size information for some intrinsics, it did not do the same for CallSite vs.
CallSite queries.

This change refactors the intrinsic-specific logic in BasicAA into a generic AA
query function: getArgLocation, which is overridden by BasicAA to supply the
intrinsic-specific knowledge, and used by AA's generic implementation. This
allows the intrinsic-specific knowledge to be used by both CallSite vs. Loc and
CallSite vs. CallSite queries, and simplifies the BasicAA implementation.

Currently, only one function, Mac's memset_pattern16, is handled by BasicAA
(all the rest are intrinsics). As a side-effect of this refactoring, BasicAA's
getModRefBehavior override now also returns OnlyAccessesArgumentPointees for
this function (which is an improvement).

llvm-svn: 213219
2014-07-17 01:28:25 +00:00
..
Analysis Improve BasicAA CS-CS queries (redux) 2014-07-17 01:28:25 +00:00
Assembler
Bindings
Bitcode Roundtrip the inalloca bit on allocas through bitcode 2014-07-16 01:34:27 +00:00
BugPoint llvm/test/BugPoint/compile-custom.ll: Use explicit %python to invoke a test script, compile-custom.ll.py, for shebang-incapable hosts. 2014-07-11 14:44:10 +00:00
CodeGen Fixed formatting, removed bug reference, renamed testcase 2014-07-16 22:40:28 +00:00
DebugInfo Try out FileCheck's new (in r212810) -implicit-check-not in a DebugInfo test. 2014-07-15 21:06:37 +00:00
ExecutionEngine [RuntimeDyld] Replace a crufty old ARM RuntimeDyld test with a new one that uses 2014-07-10 23:29:11 +00:00
Feature IR: Allow comdats to be applied to globals with internal linkage 2014-07-13 04:56:11 +00:00
FileCheck Add FileCheck -implicit-check-not option to allow stricter tests without adding too many CHECK-NOTs manually. 2014-07-11 12:39:32 +00:00
Instrumentation CHECK-LABEL-ize one test 2014-07-16 18:11:31 +00:00
Integer
JitListener
Linker
LTO
MC [AArch64] Add negative tests for the SIMD & FP LDP instructions. 2014-07-15 16:33:24 +00:00
Object Add the "-x" flag to llvm-nm for Mach-O files that prints the fields of a symbol in hex. 2014-07-16 17:38:26 +00:00
Other IR: Fold away compares between GV GEPs and GVs 2014-07-04 22:05:26 +00:00
TableGen
tools llvm-objdump: Handle BSS sections larger than the object file 2014-07-14 16:20:14 +00:00
Transforms Improve BasicAA CS-CS queries (redux) 2014-07-17 01:28:25 +00:00
Unit Let test/Unit/lit.cfg add config.shlibdir to $PATH on DLL platforms like cygming. 2014-07-04 05:11:55 +00:00
Verifier IR: Allow comdats to be applied to globals with internal linkage 2014-07-13 04:56:11 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg llvm/test/lit.cfg: Let %python available. 2014-07-11 14:36:39 +00:00
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh