llvm-project/llvm/lib/CodeGen/SelectionDAG
Nirav Dave a8f63af9d1 Improve Aliasing of operations to static alloca
Recommiting after adding check to avoid miscomputing alias information
on addresses of the same base but different subindices.

Memory accesses offset from frame indices may alias, e.g., we
may merge write from function arguments passed on the stack when they
are contiguous. As a result, when checking aliasing, we consider the
underlying frame index's offset from the stack pointer.

Static allocs are realized as stack objects in SelectionDAG, but its
offset is not set until post-DAG causing DAGCombiner's alias check to
consider access to static allocas to frequently alias. Modify isAlias
to consider access between static allocas and access from other frame
objects to be considered aliasing.

Many test changes are included here. Most are fixes for tests which
indirectly relied on our aliasing ability and needed to be modified to
preserve their original intent.

The remaining tests have minor improvements due to relaxed
ordering. The exception is CodeGen/X86/2011-10-19-widen_vselect.ll
which has a minor degradation dispite though the pre-legalized DAG is
improved.

Reviewers: rnk, mkuper, jonpa, hfinkel, uweigand

Reviewed By: rnk

Subscribers: sdardis, nemanjai, javed.absar, llvm-commits

Differential Revision: https://reviews.llvm.org/D33345

llvm-svn: 308025
2017-07-14 13:56:21 +00:00
..
CMakeLists.txt [DAG] Move BaseIndexOffset into separate Libarary. NFC. 2017-06-21 15:40:43 +00:00
DAGCombiner.cpp Improve Aliasing of operations to static alloca 2017-07-14 13:56:21 +00:00
FastISel.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
FunctionLoweringInfo.cpp ISel: Fix FastISel of swifterror values 2017-06-15 17:34:42 +00:00
InstrEmitter.cpp fix typos in comments and error messages; NFC 2017-07-10 12:44:25 +00:00
InstrEmitter.h Pass DebugLoc and SDLoc by const ref. 2016-06-12 15:39:02 +00:00
LLVMBuild.txt
LegalizeDAG.cpp Fix libcall expansion creating DAG nodes with invalid type post type legalization. 2017-07-05 22:01:49 +00:00
LegalizeFloatTypes.cpp [legalize-types] Clean up softening machinery. 2017-07-04 01:08:55 +00:00
LegalizeIntegerTypes.cpp Reland "[mips] Fix multiprecision arithmetic." 2017-07-13 11:28:05 +00:00
LegalizeTypes.cpp [legalize-types] Clean up softening machinery. 2017-07-04 01:08:55 +00:00
LegalizeTypes.h [legalize-types] Clean up softening machinery. 2017-07-04 01:08:55 +00:00
LegalizeTypesGeneric.cpp [legalize-types] Clean up softening machinery. 2017-07-04 01:08:55 +00:00
LegalizeVectorOps.cpp Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC. 2017-06-03 05:11:14 +00:00
LegalizeVectorTypes.cpp [X86] Relax an assertion when legalizing vector types. 2017-07-09 19:22:48 +00:00
ResourcePriorityQueue.cpp Refactoring with range-based for, NFC 2017-05-04 13:35:17 +00:00
SDNodeDbgValue.h Apply clang-tidy's misc-move-constructor-init throughout LLVM. 2016-05-27 14:27:24 +00:00
ScheduleDAGFast.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ScheduleDAGRRList.cpp [SelectionDAG] Fix an use-after-free issue introduced in r305775. 2017-06-20 09:29:43 +00:00
ScheduleDAGSDNodes.cpp Remove redundant call to GluedNodes.back() [NFC] 2017-02-19 16:56:18 +00:00
ScheduleDAGSDNodes.h [Target] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-11 01:45:03 +00:00
ScheduleDAGVLIW.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
SelectionDAG.cpp Enhance synchscope representation 2017-07-11 22:23:00 +00:00
SelectionDAGAddressAnalysis.cpp Rewrite areNonVolatileConsecutiveLoads to use BaseIndexOffset 2017-07-05 01:21:23 +00:00
SelectionDAGBuilder.cpp [TargetLowering] Add hook for adding target MMO flags when doing ISel. 2017-07-13 03:49:42 +00:00
SelectionDAGBuilder.h Handle ConstantExpr correctly in SelectionDAGBuilder 2017-07-09 16:01:04 +00:00
SelectionDAGDumper.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
SelectionDAGISel.cpp [FastISel] fix a fallback diagnostic. 2017-07-09 05:55:20 +00:00
SelectionDAGPrinter.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
SelectionDAGTargetInfo.cpp
StatepointLowering.cpp Reland "[SelectionDAG] Enable target specific vector scalarization of calls and returns" 2017-06-09 14:37:08 +00:00
StatepointLowering.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
TargetLowering.cpp [SelectionDAG] Use APInt::isSubsetOf. NFC 2017-06-16 23:19:14 +00:00