aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/APInt.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-10-03 12:33:59 +0200
committerNikita Popov <nikita.ppv@gmail.com>2021-10-05 18:07:57 +0200
commitc117d77e937f410a2b9c54eaec0fc5fe2a653399 (patch)
treea5804453c17490773d518bea536b12125f8daad4 /llvm/lib/Support/APInt.cpp
parentd67935ed8e78e7ffef17b6f7193b4f11f52a143d (diff)
downloadllvm-c117d77e937f410a2b9c54eaec0fc5fe2a653399.zip
llvm-c117d77e937f410a2b9c54eaec0fc5fe2a653399.tar.gz
llvm-c117d77e937f410a2b9c54eaec0fc5fe2a653399.tar.bz2
[ConstantFold] Refactor load folding
This refactors load folding to happen in two cleanly separated steps: ConstantFoldLoadFromConstPtr() takes a pointer to load from and decomposes it into a constant initializer base and an offset. Then ConstantFoldLoadFromConst() loads from that initializer at the given offset. This makes the core logic independent of having actual GEP expressions (and those GEP expressions having certain structure) and will allow exposing ConstantFoldLoadFromConst() as an independent API in the future. This is mostly only a refactoring, but it does make the folding logic slightly more powerful. Differential Revision: https://reviews.llvm.org/D111023
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
0 files changed, 0 insertions, 0 deletions