aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/Analysis.cpp
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-10-03 09:43:21 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-10-03 09:43:21 -0700
commited6b15283ff5f9d13cb48f88ba6e189be11291e8 (patch)
tree3dcbfc6d6c202f8fa1b5f418e49b433eb07c8c80 /lib/CodeGen/Analysis.cpp
parent8ed96f4d0ca9b8114875997f1f0196fc89a41a04 (diff)
PNaCl bitcode: Simplify how the writer elides casts
The PNaCl bitcode writer had some complex logic for deciding when to omit casts in the output. This was left over from when the writer was trying to leave in the casts in some but not all cases (as part of incrementally removing casts). This is no longer needed now that the writer just omits all inttoptrs, all ptrtoints, and all pointer bitcasts. This cleanup also fixes the writer so that it elides an inttoptr of a ptrtoint. This sequence is allowed by the PNaCl ABI verifier, but never occurred in practice because ReplacePtrsWithInts' SimplifyCasts() function converts this sequence to an equivalent bitcast. Before this change, the writer would give this error for an inttoptr-of-ptrtoint: LLVM ERROR: Illegal (PNaCl ABI) pointer cast : %1 = ptrtoint [4 x i8]* @bytes to i32 BUG=https://code.google.com/p/nativeclient/issues/detail?id=3590 TEST=toolchain trybots Review URL: https://codereview.chromium.org/25817002
Diffstat (limited to 'lib/CodeGen/Analysis.cpp')
0 files changed, 0 insertions, 0 deletions