aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorMitch Phillips <31459023+hctim@users.noreply.github.com>2020-08-03 13:55:27 -0700
committerMitch Phillips <31459023+hctim@users.noreply.github.com>2020-08-03 14:28:44 -0700
commit9a05fa10bd05525adedb6117351333699a3d4ae2 (patch)
tree54b69a3a97a082226ee67de326cc4c10cd3d1ec6 /clang/lib/Frontend/CompilerInvocation.cpp
parent22916481c11e1d46132752086290a668e62fc9ce (diff)
downloadllvm-9a05fa10bd05525adedb6117351333699a3d4ae2.zip
llvm-9a05fa10bd05525adedb6117351333699a3d4ae2.tar.gz
llvm-9a05fa10bd05525adedb6117351333699a3d4ae2.tar.bz2
[HWASan] [GlobalISel] Add +tagged-globals backend feature for GlobalISel
GlobalISel is the default ISel for aarch64 at -O0. Prior to D78465, GlobalISel didn't have support for dealing with address-of-global lowerings, so it fell back to SelectionDAGISel. HWASan Globals require special handling, as they contain the pointer tag in the top 16-bits, and are thus outside the code model. We need to generate a `movk` in the instruction sequence with a G3 relocation to ensure the bits are relocated properly. This is implemented in SelectionDAGISel, this patch does the same for GlobalISel. GlobalISel and SelectionDAGISel differ in their lowering sequence, so there are differences in the final instruction sequence, explained in `tagged-globals.ll`. Both of these implementations are correct, but GlobalISel is slightly larger code size / slightly slower (by a couple of arithmetic instructions). I don't see this as a problem for now as GlobalISel is only on by default at `-O0`. Reviewed By: aemerson, arsenm Differential Revision: https://reviews.llvm.org/D82615
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions