#
a5bbc6ef |
| 23-Feb-2022 |
Bill Wendling <isanbard@gmail.com> |
[NFC] Remove unnecessary "#include"s from header files
|
#
33b38339 |
| 28-Jan-2022 |
Fangrui Song <i@maskray.me> |
[lld] Add module name to LTO inline asm diagnostic
Close #52781: for LTO, the inline asm diagnostic uses `<inline asm>` as the file name (lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp) and it is un
[lld] Add module name to LTO inline asm diagnostic
Close #52781: for LTO, the inline asm diagnostic uses `<inline asm>` as the file name (lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp) and it is unclear which module has the issue.
With this patch, we will see the module name (say `asm.o`) before `<inline asm>` with ThinLTO.
``` % clang -flto=thin -c asm.c && myld.lld asm.o -e f ld.lld: error: asm.o <inline asm>:1:2: invalid instruction mnemonic 'invalid' invalid ^~~~~~~ ```
For regular LTO, unfortunately the original module name is lost and we only get ld-temp.o.
Reviewed By: #lld-macho, ychen, Jez Ng
Differential Revision: https://reviews.llvm.org/D118434
show more ...
|
#
c2f819af |
| 23-May-2021 |
Philipp Krones <philipp.krones@embecosm.com> |
[MC] Refactor MCObjectFileInfo initialization and allow targets to create MCObjectFileInfo
This makes it possible for targets to define their own MCObjectFileInfo. This MCObjectFileInfo is then used
[MC] Refactor MCObjectFileInfo initialization and allow targets to create MCObjectFileInfo
This makes it possible for targets to define their own MCObjectFileInfo. This MCObjectFileInfo is then used to determine things like section alignment.
This is a follow up to D101462 and prepares for the RISCV backend defining the text section alignment depending on the enabled extensions.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D101921
show more ...
|
#
632ebc4a |
| 05-May-2021 |
Philipp Krones <philipp.krones@embecosm.com> |
[MC] Untangle MCContext and MCObjectFileInfo
This untangles the MCContext and the MCObjectFileInfo. There is a circular dependency between MCContext and MCObjectFileInfo. Currently this dependency a
[MC] Untangle MCContext and MCObjectFileInfo
This untangles the MCContext and the MCObjectFileInfo. There is a circular dependency between MCContext and MCObjectFileInfo. Currently this dependency also exists during construction: You can't contruct a MOFI without a MCContext without constructing the MCContext with a dummy version of that MOFI first. This removes this dependency during construction. In a perfect world, MCObjectFileInfo wouldn't depend on MCContext at all, but only be stored in the MCContext, like other MC information. This is future work.
This also shifts/adds more information to the MCContext making it more available to the different targets. Namely:
- TargetTriple - ObjectFileType - SubtargetInfo
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D101462
show more ...
|
#
76b0ea7f |
| 11-Aug-2020 |
Roman Tereshin <rtereshin@apple.com> |
Reset NextFnNum in MachineModuleInfo::initialize
In an env that reuses compiler instances for multiple compilations, this omission results in non-deterministic assembly output (names of the auto-gen
Reset NextFnNum in MachineModuleInfo::initialize
In an env that reuses compiler instances for multiple compilations, this omission results in non-deterministic assembly output (names of the auto-generated labels) if the order or full set of Modules compiled varies.
Differential Revision: https://reviews.llvm.org/D100797
show more ...
|
#
90af1344 |
| 07-Apr-2021 |
Arthur Eubanks <aeubanks@google.com> |
Revert "[AsmPrinter] Delete dead takeDeletedSymbsForFunction()"
This reverts commit 9583a3f2625818b78c0cf6d473cdedb9f23ad82c.
This wasn't NFC as initially thought. Needed for D99707.
|
#
5de2d189 |
| 23-Feb-2021 |
Yuanfang Chen <yuanfang.chen@sony.com> |
[Diagnose] Unify MCContext and LLVMContext diagnosing
The situation with inline asm/MC error reporting is kind of messy at the moment. The errors from MC layout are not reliably propagated and users
[Diagnose] Unify MCContext and LLVMContext diagnosing
The situation with inline asm/MC error reporting is kind of messy at the moment. The errors from MC layout are not reliably propagated and users have to specify an inlineasm handler separately to get inlineasm diagnose. The latter issue is not a correctness issue but could be improved.
* Kill LLVMContext inlineasm diagnose handler and migrate it to use DiagnoseInfo/DiagnoseHandler. * Introduce `DiagnoseInfoSrcMgr` to diagnose SourceMgr backed errors. This covers use cases like inlineasm, MC, and any clients using SourceMgr. * Move AsmPrinter::SrcMgrDiagInfo and its instance to MCContext. The next step is to combine MCContext::SrcMgr and MCContext::InlineSrcMgr because in all use cases, only one of them is used. * If LLVMContext is available, let MCContext uses LLVMContext's diagnose handler; if LLVMContext is not available, MCContext uses its own default diagnose handler which just prints SMDiagnostic. * Change a few clients(Clang, llc, lldb) to use the new way of reporting.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D97449
show more ...
|
#
910e2d1e |
| 14-Feb-2021 |
Kazu Hirata <kazu@google.com> |
[llvm] Use llvm::is_contained (NFC)
|
#
1e3ed091 |
| 29-Dec-2020 |
Kazu Hirata <kazu@google.com> |
[CodeGen] Use llvm::append_range (NFC)
|
#
d9a0c40b |
| 21-Dec-2020 |
Fangrui Song <i@maskray.me> |
[MC] Split MCContext::createTempSymbol, default AlwaysAddSuffix to true, and add comments
CanBeUnnamed is rarely false. Splitting to a createNamedTempSymbol makes the intention clearer and matches t
[MC] Split MCContext::createTempSymbol, default AlwaysAddSuffix to true, and add comments
CanBeUnnamed is rarely false. Splitting to a createNamedTempSymbol makes the intention clearer and matches the direction of reverted r240130 (to drop the unneeded parameters).
No behavior change.
show more ...
|
#
d4ba5e15 |
| 12-Nov-2020 |
Hendrik Greving <hgreving@google.com> |
Add MachineModuleInfo constructor with external MCContext
Adds a constructor to MachineModuleInfo and MachineModuleInfoWapperPass that takes an external MCContext. If provided, the external context
Add MachineModuleInfo constructor with external MCContext
Adds a constructor to MachineModuleInfo and MachineModuleInfoWapperPass that takes an external MCContext. If provided, the external context will be used throughout codegen instead of MMI's default one.
This enables external drivers to take ownership of data put on the MMI's context during codegen. The internal context is used otherwise and destroyed upon finish.
Differential Revision: https://reviews.llvm.org/D91313
show more ...
|
#
4242df14 |
| 16-Oct-2020 |
Jameson Nash <vtjnash@gmail.com> |
Revert "make the AsmPrinterHandler array public"
I messed up one of the tests.
|
#
ac2def2d |
| 15-Oct-2020 |
Jameson Nash <vtjnash@gmail.com> |
make the AsmPrinterHandler array public
This lets external consumers customize the output, similar to how AssemblyAnnotationWriter lets the caller define callbacks when printing IR. The array of han
make the AsmPrinterHandler array public
This lets external consumers customize the output, similar to how AssemblyAnnotationWriter lets the caller define callbacks when printing IR. The array of handlers already existed, this just cleans up the code so that it can be exposed publically.
Differential Revision: https://reviews.llvm.org/D74158
show more ...
|
#
4b5412b5 |
| 24-Jul-2020 |
Sridhar Gopinath <sridhar.g@utexas.edu> |
Fix the move constructor of MMI to move MachineFunctions map
The move constructor of MachineModuleInfo currently does not copy the MachineFunctions map. This commit fixes this issue.
Patch by Sridh
Fix the move constructor of MMI to move MachineFunctions map
The move constructor of MachineModuleInfo currently does not copy the MachineFunctions map. This commit fixes this issue.
Patch by Sridhar Gopinath. Thanks!
Differential Revision: https://reviews.llvm.org/D84274
show more ...
|
Revision tags: llvmorg-10.0.1-rc1 |
|
#
35b7b085 |
| 03-Apr-2020 |
Daniel Sanders <daniel_l_sanders@apple.com> |
Allow MachineFunction to obtain non-const Function (to enable MIR-level debugify)
Summary: To debugify MIR, we need to be able to create metadata and to do that, we need a non-const Module. However,
Allow MachineFunction to obtain non-const Function (to enable MIR-level debugify)
Summary: To debugify MIR, we need to be able to create metadata and to do that, we need a non-const Module. However, MachineFunction only had a const reference to the Function preventing this.
Reviewers: aprantl, bogner
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77439
show more ...
|
#
d65557d1 |
| 03-Apr-2020 |
jasonliu <jasonliu.development@gmail.com> |
[NFC][XCOFF][AIX] Refactor get/setContainingCsect
Summary: For current architect, we always require setContainingCsect to be called on every MCSymbol got used in XCOFF context. This is very hard to
[NFC][XCOFF][AIX] Refactor get/setContainingCsect
Summary: For current architect, we always require setContainingCsect to be called on every MCSymbol got used in XCOFF context. This is very hard to achieve because symbols gets created everywhere and other MCSymbol types(ELF, COFF) do not have similar rules. It's very easy to miss setting the containing csect, and we would need to add a lot of XCOFF specialized code around some common code area.
This patch intendeds to do 1. Rely on getFragment().getParent() to get csect from labels. 2. Only use get/setRepresentedCsect (was get/setContainingCsect) if symbol itself represents a csect.
Reviewers: DiggerLin, hubert.reinterpretcast, daltenty
Differential Revision: https://reviews.llvm.org/D77080
show more ...
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1 |
|
#
9583a3f2 |
| 19-Jan-2020 |
Fangrui Song <i@maskray.me> |
[AsmPrinter] Delete dead takeDeletedSymbsForFunction()
The code added in r98579 is dead now.
|
Revision tags: llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
#
ca33727a |
| 14-Nov-2019 |
Xiangling Liao <Xiangling.Liao@ibm.com> |
[AIX] Lowering jump table, constant pool and block address in asm
This patch lowering jump table, constant pool and block address in assembly. 1. On AIX, jump table index is always relative; 2. Put
[AIX] Lowering jump table, constant pool and block address in asm
This patch lowering jump table, constant pool and block address in assembly. 1. On AIX, jump table index is always relative; 2. Put CPI and JTI into ReadOnlySection until we support unique data sections; 3. Create the temp symbol for block address symbol; 4. Update MIR testcases and add related assembly part;
Differential Revision: https://reviews.llvm.org/D70243
show more ...
|
#
05da2fe5 |
| 13-Nov-2019 |
Reid Kleckner <rnk@google.com> |
Sink all InitializePasses.h includes
This file lists every pass in LLVM, and is included by Pass.h, which is very popular. Every time we add, remove, or rename a pass in LLVM, it caused lots of reco
Sink all InitializePasses.h includes
This file lists every pass in LLVM, and is included by Pass.h, which is very popular. Every time we add, remove, or rename a pass in LLVM, it caused lots of recompilation.
I found this fact by looking at this table, which is sorted by the number of times a file was changed over the last 100,000 git commits multiplied by the number of object files that depend on it in the current checkout: recompiles touches affected_files header 342380 95 3604 llvm/include/llvm/ADT/STLExtras.h 314730 234 1345 llvm/include/llvm/InitializePasses.h 307036 118 2602 llvm/include/llvm/ADT/APInt.h 213049 59 3611 llvm/include/llvm/Support/MathExtras.h 170422 47 3626 llvm/include/llvm/Support/Compiler.h 162225 45 3605 llvm/include/llvm/ADT/Optional.h 158319 63 2513 llvm/include/llvm/ADT/Triple.h 140322 39 3598 llvm/include/llvm/ADT/StringRef.h 137647 59 2333 llvm/include/llvm/Support/Error.h 131619 73 1803 llvm/include/llvm/Support/FileSystem.h
Before this change, touching InitializePasses.h would cause 1345 files to recompile. After this change, touching it only causes 550 compiles in an incremental rebuild.
Reviewers: bkramer, asbirlea, bollu, jdoerfert
Differential Revision: https://reviews.llvm.org/D70211
show more ...
|
#
fdaa7421 |
| 07-Oct-2019 |
Jordan Rose <jordan_rose@apple.com> |
Second attempt to add iterator_range::empty()
Doing this makes MSVC complain that `empty(someRange)` could refer to either C++17's std::empty or LLVM's llvm::empty, which previously we avoided via S
Second attempt to add iterator_range::empty()
Doing this makes MSVC complain that `empty(someRange)` could refer to either C++17's std::empty or LLVM's llvm::empty, which previously we avoided via SFINAE because std::empty is defined in terms of an empty member rather than begin and end. So, switch callers over to the new method as it is added.
https://reviews.llvm.org/D68439
llvm-svn: 373935
show more ...
|
#
cc382cf7 |
| 30-Sep-2019 |
Yuanfang Chen <yuanfang.chen@sony.com> |
[NewPM] Port MachineModuleInfo to the new pass manager.
Existing clients are converted to use MachineModuleInfoWrapperPass. The new interface is for defining a new pass manager API in CodeGen.
Revi
[NewPM] Port MachineModuleInfo to the new pass manager.
Existing clients are converted to use MachineModuleInfoWrapperPass. The new interface is for defining a new pass manager API in CodeGen.
Reviewers: fedor.sergeev, philip.pfaffe, chandlerc, arsenm
Reviewed By: arsenm, fedor.sergeev
Differential Revision: https://reviews.llvm.org/D64183
llvm-svn: 373240
show more ...
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2 |
|
#
79176a25 |
| 09-Aug-2019 |
Bill Wendling <isanbard@gmail.com> |
[CodeGen] Require a name for a block addr target
Summary: A block address may be used in inline assembly. In which case it requires a name so that the asm parser has something to parse. Creating a n
[CodeGen] Require a name for a block addr target
Summary: A block address may be used in inline assembly. In which case it requires a name so that the asm parser has something to parse. Creating a name for every block address is a large hammer, but is necessary because at the point when a temp symbol is created we don't necessarily know if it's used in inline asm. This ensures that it exists regardless.
Reviewers: nickdesaulniers, craig.topper
Subscribers: nathanchance, javed.absar, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65352
llvm-svn: 368478
show more ...
|
#
6dbbd0f3 |
| 08-Aug-2019 |
Brian Cain <bcain@quicinc.com> |
[llvm-mc] Add reportWarning() to MCContext
Adding reportWarning() to MCContext, so that it can be used from the Hexagon assembler backend.
llvm-svn: 368327
|
Revision tags: llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2 |
|
#
4f09d9fc |
| 29-May-2019 |
Sam McCall <sam.mccall@gmail.com> |
Qualify use of llvm::empty that's ambiguous with std::empty
llvm-svn: 361968
|
Revision tags: llvmorg-8.0.1-rc1, llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2 |
|
#
2c36240a |
| 24-Jan-2019 |
James Y Knight <jyknight@google.com> |
Fix emission of _fltused for MSVC.
It should be emitted when any floating-point operations (including calls) are present in the object, not just when calls to printf/scanf with floating point args a
Fix emission of _fltused for MSVC.
It should be emitted when any floating-point operations (including calls) are present in the object, not just when calls to printf/scanf with floating point args are made.
The difference caused by this is very subtle: in static (/MT) builds, on x86-32, in a program that uses floating point but doesn't print it, the default x87 rounding mode may not be set properly upon initialization.
This commit also removes the walk of the types pointed to by pointer arguments in calls. (To assist in opaque pointer types migration -- eventually the pointee type won't be available.)
That latter implies that it will no longer consider a call like `scanf("%f", &floatvar)` as sufficient to emit _fltused on its own. And without _fltused, `scanf("%f")` will abort with error R6002. This new behavior is unlikely to bite anyone in practice (you'd have to read a float, and do nothing with it!), and also, is consistent with MSVC.
Differential Revision: https://reviews.llvm.org/D56548
llvm-svn: 352076
show more ...
|