1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
llvm-mirror/lib
Adhemerval Zanella cb9b91e743 [sanitizer] [msan] Fix origin store of array types
This patch fixes the memory sanitizer origin store instrumentation for
array types.  This can be triggered by cases where frontend lowers
function return to array type instead of aggregation.

For instance, the C code:

--
struct mypair {
 int64_t x;
 int y;
};

mypair my_make_pair(int64_t x, int y)  {
 mypair p;
 p.x = x;
 p.y = y;
 return p;
}

int foo (int p)
{
  mypair z = my_make_pair(p, 0);
  return z.y + z.x;
}
--

It will be lowered with target set to aarch64-linux and -O0 to:

--
[...]
define i32 @_Z3fooi(i32 %p) #0 {
[...]
%call = call [2 x i64] @_Z12my_make_pairxi(i64 %conv, i32 0)
%1 = bitcast %struct.mypair* %z to [2 x i64]*
store [2 x i64] %call, [2 x i64]* %1, align 8
[...]
--

The origin store will emit a 'icmp' to test each store value again the
TLS origin array.  However since 'icmp' does not support ArrayType the
memory instrumentation phase will bail out with an error.

This patch change it by using the same strategy used for struct type on
array.

It fixes the 'test/msan/insertvalue_origin.cc' for aarch64 (the -O0 case).

llvm-svn: 257375
2016-01-11 19:55:27 +00:00
..
Analysis LoopInfo: Simplify ownership of Loop objects 2016-01-08 19:08:53 +00:00
AsmParser Implemented Support of IA interrupt and exception handlers: 2015-12-21 14:07:14 +00:00
Bitcode Bitcode: Fix reading and writing of ConstantDataVectors of halfs 2016-01-06 22:31:32 +00:00
CodeGen [NFC] Fix whitespace. 2016-01-11 19:17:36 +00:00
DebugInfo fixing type. 2016-01-09 00:31:56 +00:00
ExecutionEngine [LLI] Replace the LLI remote-JIT support with the new ORC remote-JIT components. 2016-01-11 16:35:55 +00:00
Fuzzer [libFuzzer] debug prints in tracing 2016-01-09 03:46:08 +00:00
IR [WinEH] Fix catchpad pred verification 2016-01-10 04:32:03 +00:00
IRReader [ThinLTO] Metadata linking for imported functions 2015-12-17 17:14:09 +00:00
LibDriver
LineEditor
Linker [ThinLTO] Use new in-place symbol changes for exporting module 2016-01-08 17:06:29 +00:00
LTO [attrs] Split the late-revisit pattern for deducing norecurse in 2016-01-08 10:55:52 +00:00
MC Added support for macro emission in dwarf (supporting DWARF version 4). 2016-01-07 14:28:20 +00:00
Object Handle archives with paths in the names. 2015-12-18 16:07:17 +00:00
Option Convert Arg, ArgList, and Option to dump() to dbgs() rather than errs(). 2015-12-18 18:55:26 +00:00
Passes [attrs] Extract the pure inference of function attributes into 2015-12-27 08:41:34 +00:00
ProfileData Move coveragemap_error enum into coverage namespace and InstrProf.h /NFC 2016-01-10 21:56:33 +00:00
Support IntEqClasses: Let join() return the new leader 2016-01-08 01:16:39 +00:00
TableGen [TableGen] Use some free space in Init to store the opcode for UnOpInit/BinOpInit/TernOpInit allowing those types to be a little smaller. NFC 2016-01-04 06:28:49 +00:00
Target AMDGPU: Fix ctlz combine for sub 32-bit types 2016-01-11 17:02:06 +00:00
Transforms [sanitizer] [msan] Fix origin store of array types 2016-01-11 19:55:27 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile