1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/include/llvm
Eli Friedman b83eae9454 Recommit [ScalarEvolution] Make getMinusSCEV() fail for unrelated pointers.
As part of making ScalarEvolution's handling of pointers consistent, we
want to forbid multiplying a pointer by -1 (or any other value). This
means we can't blindly subtract pointers.

There are a few ways we could deal with this:
1. We could completely forbid subtracting pointers in getMinusSCEV()
2. We could forbid subracting pointers with different pointer bases
(this patch).
3. We could try to ptrtoint pointer operands.

The option in this patch is more friendly to non-integral pointers: code
that works with normal pointers will also work with non-integral
pointers. And it seems like there are very few places that actually
benefit from the third option.

As a minimal patch, the ScalarEvolution implementation of getMinusSCEV
still ends up subtracting pointers if they have the same base.  This
should eliminate the shared pointer base, but eventually we'll need to
rewrite it to avoid negating the pointer base. I plan to do this as a
separate step to allow measuring the compile-time impact.

This doesn't cause obvious functional changes in most cases; the one
case that is significantly affected is ICmpZero handling in LSR (which
is the source of almost all the test changes).  The resulting changes
seem okay to me, but suggestions welcome.  As an alternative, I tried
explicitly ptrtoint'ing the operands, but the result doesn't seem
obviously better.

I deleted the test lsr-undef-in-binop.ll becuase I couldn't figure out
how to repair it to test what it was actually trying to test.

Recommitting with fix to MemoryDepChecker::isDependent.

Differential Revision: https://reviews.llvm.org/D104806
2021-07-06 12:16:05 -07:00
..
ADT [llvm][iwyu] explicitly includes <functional> and <utility> 2021-07-04 06:02:11 +00:00
Analysis Recommit [ScalarEvolution] Make getMinusSCEV() fail for unrelated pointers. 2021-07-06 12:16:05 -07:00
AsmParser Revert "[DebugInfo] Enforce implicit constraints on distinct MDNodes" 2021-07-02 15:57:07 -07:00
BinaryFormat [AMDGPU] Reserve AMDGPU ELF e_flags machine 0x43 2021-06-24 22:51:47 +00:00
Bitcode
Bitstream
CodeGen [DebugInfo][InstrRef][3/4] Produce DBG_INSTR_REFs for all variable locations 2021-07-06 18:31:38 +01:00
Config
DebugInfo llvm-dwarfdump: Print warnings on invalid DWARF 2021-06-27 11:38:35 +02:00
Demangle [Demangle][Rust] Hide implementation details NFC 2021-06-23 18:28:16 +02:00
DWARFLinker
ExecutionEngine [ORC] Rename SPSTargetAddress to SPSExecutorAddress. 2021-07-02 12:40:14 +10:00
FileCheck
Frontend [OpenMP] Enable HeapToStack conversion in OpenMPOpt for new RTL globalization calls 2021-06-22 13:23:05 -04:00
FuzzMutate
InterfaceStub
IR [PowerPC] Implament Load and Reserve and Store Conditional Builtins 2021-07-05 21:35:41 -05:00
IRReader
LineEditor
Linker
LTO
MC [AIX] Use AsmParser to do inline asm parsing 2021-07-02 16:12:21 +00:00
MCA
Object [llvm-readobj][XCOFF] Add support for printing the String Table. 2021-07-05 04:16:58 +00:00
ObjectYAML [LLD][LLVM] CG Graph profile using relocations 2021-06-24 09:09:33 -07:00
Option [OptTable] Rename PrintHelp to printHelp 2021-06-24 14:47:03 -07:00
Passes [NFC][PassBuilder] addVectorPasses(): clarify that 'IsLTO' is actually 'IsFullLTO' 2021-07-01 10:09:24 +03:00
ProfileData [llvm-cov] Enforce alignment of function records 2021-06-25 10:56:06 +02:00
Remarks
Support [llvm][iwyu] explicitly includes <functional> and <utility> 2021-07-04 06:02:11 +00:00
TableGen
Target [NFC] Fix a few whitespace issues and typos. 2021-07-04 11:49:58 +01:00
Testing/Support added some example code for llvm::Expected<T> 2021-07-01 09:57:20 +00:00
TextAPI [TextAPI] add symbol name prefixes to central location, NFC 2021-06-23 11:21:00 -07:00
ToolDrivers
Transforms [NFC][PassBuilder] addVectorPasses(): clarify that 'IsLTO' is actually 'IsFullLTO' 2021-07-01 10:09:24 +03:00
WindowsManifest
WindowsResource
XRay
CMakeLists.txt
InitializePasses.h
LinkAllIR.h
LinkAllPasses.h
module.extern.modulemap
module.install.modulemap
module.modulemap
module.modulemap.build
Pass.h
PassAnalysisSupport.h
PassInfo.h
PassRegistry.h
PassSupport.h