[all-commits] [llvm/llvm-project] 2fe85d: [Attributor] Don't access pointer elem type in con...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Thu Mar 11 12:37:03 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2fe85dd289b99e1adb7f6ecfbe3ba61b2be8324a
https://github.com/llvm/llvm-project/commit/2fe85dd289b99e1adb7f6ecfbe3ba61b2be8324a
Author: Nikita Popov <nikita.ppv at gmail.com>
Date: 2021-03-11 (Thu, 11 Mar 2021)
Changed paths:
M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
Log Message:
-----------
[Attributor] Don't access pointer elem type in constructPointer (NFC)
Splitting this out as the change is non-trivial: The way this code
handled pointer types doesn't really make sense, as GEPs can only
apply an offset to the outermost pointer, but can't drill down
into interior pointer types (which would require dereferencing
memory).
Instead give special treatment to the first (pointer) index.
I've hardcoded it to zero as that's the only way the function is
used right now, but handling non-zero indexes would be
straightforward.
The original goal here was to have an element type for CreateGEP.
More information about the All-commits
mailing list