aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineOperand.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2020-01-23 22:49:50 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2020-01-24 14:42:45 +0300
commitba545c814bc19c3b1ec9ce88a7f13575e0e4ce1d (patch)
tree818f31747586210f2f9be9914ad23f398f8f10b7 /llvm/lib/CodeGen/MachineOperand.cpp
parent1af6209d64dc503800797b647f9c281cc2c4ec87 (diff)
downloadllvm-ba545c814bc19c3b1ec9ce88a7f13575e0e4ce1d.zip
llvm-ba545c814bc19c3b1ec9ce88a7f13575e0e4ce1d.tar.gz
llvm-ba545c814bc19c3b1ec9ce88a7f13575e0e4ce1d.tar.bz2
[Sema] Try 2: Attempt to perform call-size-specific `__attribute__((alloc_align(param_idx)))` validation
Summary: `alloc_align` attribute takes parameter number, not the alignment itself, so given **just** the attribute/function declaration we can't do any sanity checking for said alignment. However, at call site, given the actual `Expr` that is passed into that parameter, we //might// be able to evaluate said `Expr` as Integer Constant Expression, and perform the sanity checks. But since there is no requirement for that argument to be an immediate, we may fail, and that's okay. However if we did evaluate, we should enforce the same constraints as with `__builtin_assume_aligned()`/`__attribute__((assume_aligned(imm)))`: said alignment is a power of two, and is not greater than our magic threshold This was initially committed in c2a9061ac5166e48fe85ea2b6dbce9457c964958 but reverted in 00756b182398b92abe16559287467079087aa631 because of suspicious bot failures. Reviewers: erichkeane, aaron.ballman, hfinkel, rsmith, jdoerfert Reviewed By: erichkeane Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72996
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
0 files changed, 0 insertions, 0 deletions