HomePhabricator

[X86] Deduplicate symbol lowering logic, NFC

Description

[X86] Deduplicate symbol lowering logic, NFC

Summary:
This refactors four pieces of code that create SDNodes for references to
symbols:

  • normal global address lowering (LEA, MOV, etc)
  • callee global address lowering (CALL)
  • external symbol address lowering (LEA, MOV, etc)
  • external symbol address lowering (CALL)

Each of these pieces of code need to:

  • classify the reference
  • lower the symbol
  • emit a RIP wrapper if needed
  • emit a load if needed
  • add offsets if needed

I think handling them all in one place will make the code easier to
maintain in the future.

Reviewers: craig.topper, RKSimon

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D61690

Details

Committed
rnkMay 16 2019, 4:15 PM
Differential Revision
D61690: [X86] Deduplicate symbol lowering logic, NFC
Parents
rL360951: Remove unneeded alignment spec from builtin_FUNCTION.cpp test
Branches
Unknown
Tags
Unknown