Commit Graph

6 Commits

Author SHA1 Message Date
Ivan Krysak ef434e46f8 LocalVariableBuilder: preserve debug information 2025-09-10 17:44:01 +02:00
Ivan Krysak a285ad2785 IRHelperRegister: get a comment from Description 2025-07-23 11:38:53 +02:00
Ivan Krysak 743998c956 LocalVariables: adopt IR helper registry 2025-07-23 11:38:51 +02:00
Pietro Fezzardi 0cb3abc9c3 LocalVariableBuilder: make array-typed allocas
This reduces the occasions where some LLVM optimization passes rewrite
the allocas, reducing the chances that the model type metadata is
discarded by LLVM passes that we don't control.
A pass that was doing this was InstCombine.
2025-04-22 15:24:30 +02:00
Alessandro Di Federico c5b9728289 LocalVariableBuilder: add pointer size assumption
This commit further centralizes the creation of allocas + ptrtoint.  The
creation of these pair of instructions is problematic when the size of a
pointer in the input and target architecture differ.

In fact, in such cases, LLVM turns trunc into masking the integer to
suppresse the high bits. This results in problematic code.

This commit introduces an assumption that ensures LLVM does not do that.
2025-03-17 08:51:29 +01:00
Pietro Fezzardi 189693140d Add LocalVariableBuilder 2025-01-29 15:17:15 +01:00