llvm-project/llvm/lib
Daniel Neilson 6f1eb58e92 [MemCpyOpt] Update to new API for memory intrinsic alignment
Summary:
This change is part of step five in the series of changes to remove alignment argument from
memcpy/memmove/memset in favour of alignment attributes. In particular, this changes the
MemCpyOpt pass to cease using:
1) The old getAlignment() API of MemoryIntrinsic in favour of getting source & dest specific
alignments through the new API.
2) The old IRBuilder CreateMemCpy/CreateMemMove single-alignment APIs in favour of the new
API that allows setting source and destination alignments independently.

We also add a few tests to fill gaps in the testing of this pass.

Steps:
Step 1) Remove alignment parameter and create alignment parameter attributes for
memcpy/memmove/memset. ( rL322965, rC322964, rL322963 )
Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing
source and dest alignments. ( rL323597 )
Step 3) Update Clang to use the new IRBuilder API. ( rC323617 )
Step 4) Update Polly to use the new IRBuilder API. ( rL323618 )
Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API,
and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment()
and [get|set]SourceAlignment() instead. ( rL323886, rL323891, rL324148, rL324273, rL324278,
rL324384, rL324395, rL324402, rL324626, rL324642, rL324653, rL324654, rL324773, rL324774,
rL324781, rL324784, rL324955, rL324960, rL325816, rL327398, rL327421 )
Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the
MemIntrinsicInst::[get|set]Alignment() methods.

Reference
   http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html
   http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html

llvm-svn: 328097
2018-03-21 14:14:55 +00:00
..
Analysis [MustExecute] Shwo the effect of using full loop info variant 2018-03-20 23:00:54 +00:00
AsmParser [X86] Added support for nocf_check attribute for indirect Branch Tracking 2018-03-17 13:29:46 +00:00
BinaryFormat Fix build broken by r328090 2018-03-21 12:18:03 +00:00
Bitcode [X86] Added support for nocf_check attribute for indirect Branch Tracking 2018-03-17 13:29:46 +00:00
CodeGen [SelectionDAG] Support multiple dangling debug info for one value 2018-03-21 09:44:34 +00:00
DebugInfo [dwarf] Unify unknown dwarf enum formatting code 2018-03-21 11:46:37 +00:00
Demangle Revert layering changes 2018-03-21 10:35:09 +00:00
ExecutionEngine [ORC] Don't fully qualify explicit destructor call -- it confuses some compilers. 2018-03-20 05:56:58 +00:00
FuzzMutate [llvm-opt-fuzzer] Add irce to the fuzzing options 2018-03-20 11:32:13 +00:00
Fuzzer [libFuzzer] Delete llvm/lib/Fuzzer 2017-10-16 20:48:19 +00:00
IR Make ConstantDataArray::get constructor templated. Will support signed integers. 2018-03-19 19:49:28 +00:00
IRReader LLParser: add an argument for overriding data layout and do not check alloca addr space 2018-01-30 22:32:39 +00:00
LTO [LTO] Return proper error object rather than null LTOModule 2018-03-13 04:37:01 +00:00
LineEditor
Linker [ThinLTO] Recommit of import global variables 2018-03-12 10:30:50 +00:00
MC [WebAssembly] Added initial AsmParser implementation. 2018-03-20 20:06:35 +00:00
Object Object: Fix handling of @@@ in .symver directive 2018-03-20 00:45:03 +00:00
ObjectYAML Reland "[DebugInfo] Support DWARF expressions in eh_frame" 2018-03-08 00:46:53 +00:00
Option [NFC] Replace iterators in PrintHelp with range-based for 2018-03-12 18:31:07 +00:00
Passes [New PM][IRCE] port of Inductive Range Check Elimination pass to the new pass manager 2018-03-15 11:01:19 +00:00
ProfileData [SampleFDO] Extend SampleProfReader to handle demangled names. 2018-03-07 16:45:33 +00:00
Support Changed createTemporaryFile without FD to actually create a file. 2018-03-19 14:19:58 +00:00
TableGen TableGen: Explicitly forbid self-references to field members 2018-03-19 14:14:28 +00:00
Target [X86][Broadwell] Merge multiple InstrRW entries that map to the same SchedWriteRes group (NFCI) (PR35955) 2018-03-21 06:28:42 +00:00
Testing Force #define GTEST_LANG_CXX11. 2017-10-27 21:12:28 +00:00
ToolDrivers [COFF] Keep the underscore on exported decorated stdcall functions in MSVC mode 2018-01-20 11:44:32 +00:00
Transforms [MemCpyOpt] Update to new API for memory intrinsic alignment 2018-03-21 14:14:55 +00:00
WindowsManifest Fix bug 34608 by moving private header out of public header. 2017-09-14 23:01:13 +00:00
XRay [XRay] clarify error messages when parsing broken traces 2018-01-30 13:41:34 +00:00
CMakeLists.txt Moving libFuzzer from LLVM to compiler-rt. 2017-08-21 23:25:12 +00:00
LLVMBuild.txt Re-apply "Introduce FuzzMutate library" 2017-08-21 22:57:06 +00:00