1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/include/llvm
Alina Sbirlea 7b373d280b Allow None as a MemoryLocation to getModRefInfo
Summary:
Adding part of the changes in D30369 (needed to make progress):
Current patch updates AliasAnalysis and MemoryLocation, but does _not_ clean up MemorySSA.

Original summary from D30369, by dberlin:
Currently, we have instructions which affect memory but have no memory
location. If you call, for example, MemoryLocation::get on a fence,
it asserts. This means things specifically have to avoid that. It
also means we end up with a copy of each API, one taking a memory
location, one not.

This starts to fix that.

We add MemoryLocation::getOrNone as a new call, and reimplement the
old asserting version in terms of it.

We make MemoryLocation optional in the (Instruction, MemoryLocation)
version of getModRefInfo, and kill the old one argument version in
favor of passing None (it had one caller). Now both can handle fences
because you can just use MemoryLocation::getOrNone on an instruction
and it will return a correct answer.

We use all this to clean up part of MemorySSA that had to handle this difference.

Note that literally every actual getModRefInfo interface we have could be made private and replaced with:

getModRefInfo(Instruction, Optional<MemoryLocation>)
and
getModRefInfo(Instruction, Optional<MemoryLocation>, Instruction, Optional<MemoryLocation>)

and delegating to the right ones, if we wanted to.

I have not attempted to do this yet.

Reviewers: dberlin, davide, dblaikie

Subscribers: sanjoy, hfinkel, chandlerc, llvm-commits

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

llvm-svn: 309641
2017-08-01 00:28:29 +00:00
..
ADT Remove Bitrig: LLVM Changes 2017-07-21 22:48:47 +00:00
Analysis Allow None as a MemoryLocation to getModRefInfo 2017-08-01 00:28:29 +00:00
AsmParser
BinaryFormat [WebAssembly] Expose the offset of each data segment 2017-07-12 00:24:54 +00:00
Bitcode ThinLTO Minimized Bitcode File Size Reduction 2017-07-21 17:25:20 +00:00
CodeGen [TargetPassConfig] Feature generic options to setup start/stop-after/before 2017-07-31 18:24:07 +00:00
Config Implement parsing and writing of a single xml manifest file. 2017-07-20 21:42:04 +00:00
DebugInfo [lld/pdb] Add an empty globals stream. 2017-07-31 19:36:08 +00:00
Demangle
ExecutionEngine Make EHFrames available to sub-classes of RTDyldMemoryManager. 2017-07-18 15:50:28 +00:00
IR Migrate PGOMemOptSizeOpt to use new OptimizationRemarkEmitter Pass 2017-07-30 00:35:33 +00:00
IRReader
LineEditor
Linker
LTO [LTO] Prevent dead stripping and internalization of symbols with sections 2017-07-25 19:42:32 +00:00
MC MC: add support for cfi_return_column 2017-07-28 03:39:19 +00:00
Object [llvm] Update MachOObjectFile::exports interface 2017-07-29 00:30:45 +00:00
ObjectYAML [yaml2obj][ELF] Add support for program headers 2017-07-19 20:38:46 +00:00
Option [libOption] - Add flag allowing to print options aliases in help text. 2017-07-26 09:09:56 +00:00
Passes Refactor the build{Module|Function}SimplificationPipeline to expose optimization phase. 2017-07-30 04:55:39 +00:00
ProfileData [ProfData] Detect if zlib is available 2017-07-21 21:41:15 +00:00
Support Fix typo in comment 2017-07-30 18:01:16 +00:00
TableGen Fix Wdocumentation warning 2017-06-20 12:28:33 +00:00
Target [TargetPassConfig] Feature generic options to setup start/stop-after/before 2017-07-31 18:24:07 +00:00
Testing/Support [Testing/Support] Remove the const_cast in TakeExpected 2017-06-22 13:11:50 +00:00
ToolDrivers llvm: add llvm-dlltool support to the archiver 2017-07-18 21:26:38 +00:00
Transforms [GVN] Recommit the patch "Add phi-translate support in scalarpre" 2017-07-28 15:47:25 +00:00
WindowsManifest Move manifest utils into separate lib, to reduce libxml2 deps. 2017-07-26 01:21:55 +00:00
XRay [XRay][tools] Add option to llvm-xray extract to symbolize functions 2017-04-18 23:23:54 +00:00
CMakeLists.txt Support: Add a VCSRevision.h header file. 2017-04-13 01:26:12 +00:00
InitializePasses.h [RegAllocFast] Add the proper initialize method to use the .mir infrastructure 2017-07-07 19:25:42 +00:00
LinkAllIR.h Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
LinkAllPasses.h Remove the BBVectorize pass. 2017-06-30 07:09:08 +00:00
module.modulemap Move manifest utils into separate lib, to reduce libxml2 deps. 2017-07-26 01:21:55 +00:00
module.modulemap.build
Pass.h Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PassAnalysisSupport.h
PassInfo.h [LegacyPassManager] Remove TargetMachine constructors 2017-05-18 17:21:13 +00:00
PassRegistry.h
PassSupport.h [LegacyPassManager] Remove TargetMachine constructors 2017-05-18 17:21:13 +00:00