[llvm] [aarch64][win] Add support for import call optimization (equivalent to MSVC /d2ImportCallOptimization) (PR #121516)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 8 14:03:07 PST 2025


================
@@ -354,6 +354,11 @@ class LLVM_ABI MachineFunction {
   /// a table of valid targets for Windows EHCont Guard.
   std::vector<MCSymbol *> CatchretTargets;
 
+  /// Mapping of call instruction to the global value and target flags that it
+  /// calls, if applicable.
+  DenseMap<const MachineInstr *, std::pair<const GlobalValue *, unsigned>>
+      CalledGlobalsMap;
----------------
efriedma-quic wrote:

Ideally, if we're adding state to MachineFunction, we should add MIR serialization/deserialization (MIRPrinter::print etc.).  Hopefully not too hard to implement here.

https://github.com/llvm/llvm-project/pull/121516


More information about the llvm-commits mailing list