| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
There is no inline asm in a .s file. Therefore, there should be no logic to
handle it in the streamer. Inline asm only exists in bitcode files, so the
logic can live in the (long misnamed) AsmPrinter class.
llvm-svn: 200011
|
|
|
|
|
|
|
|
| |
in order to fix the cygwin/mingw bots.
This reverts commit r199990.
llvm-svn: 199991
|
|
|
|
|
|
|
|
| |
compile unit. Make these relocations on the platforms that need
relocations and add a routine to ensure that we don't put the
addresses in an offset table for split dwarf.
llvm-svn: 199990
|
|
|
|
| |
llvm-svn: 199971
|
|
|
|
|
|
| |
the existence of comdat/special sections.
llvm-svn: 199954
|
|
|
|
|
|
|
|
| |
void.
Patch by Scott Talbot.
llvm-svn: 199924
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch restores the ARM mode if the user's inline assembly
does not. In the object streamer, it ensures that instructions
following the inline assembly are encoded correctly and that
correct mapping symbols are emitted. For the asm streamer, it
emits a .arm or .thumb directive.
This patch does not ensure that the inline assembly contains
the ADR instruction to switch modes at runtime.
The problem we need to solve is code like this:
int foo(int a, int b) {
int r = a + b;
asm volatile(
".align 2 \n"
".arm \n"
"add r0,r0,r0 \n"
: : "r"(r));
return r+1;
}
If we compile this function in thumb mode then the inline assembly
will switch to arm mode. We need to make sure that we switch back to
thumb mode after emitting the inline assembly or we will incorrectly
encode the instructions that follow (i.e. the assembly instructions
for return r+1).
Based on patch by David Peixotto
Change-Id: Ib57f6d2d78a22afad5de8693fba6230ff56ba48b
llvm-svn: 199818
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
type units were enabled. The crux of the issue is that the
addDwarfTypeUnitType routine can end up being indirectly recursive. In
this case, the reference into the dense map (TU) became invalid by the
time we popped all the way back and used it to add the DIE type
signature.
Instead, use early return in the case where we can bypass the recursive
step and creating a type unit. Then use the pointer to the new type unit
to set up the DIE type signature in the case where we have to.
I tried really hard to reduce a testcase for this, but it's really
annoying. You have to get this to be mid-recursion when the densemap
grows. Even if we got a test case for this today, it'd be very unlikely
to continue exercising this pattern.
llvm-svn: 199630
|
|
|
|
|
|
|
|
|
| |
getOrCreateSubprogramDIE to avoid attributes being added twice when DIEs
are merged.
rdar://problem/15842330.
llvm-svn: 199536
|
|
|
|
| |
llvm-svn: 199397
|
|
|
|
| |
llvm-svn: 199363
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
relocations
MSVC on x64 requires that we create image relative symbol
references to refer to RTTI data. Seeing as how there is no way to
explicitly make reference to a given relocation type in LLVM IR, pattern
match expressions of the form &foo - &__ImageBase.
Differential Revision: http://llvm-reviews.chandlerc.com/D2523
llvm-svn: 199312
|
|
|
|
|
|
| |
presence of CU ranges.
llvm-svn: 199276
|
|
|
|
|
|
|
| |
-ffunction-sections and update comments and TODOs about other
places that we should enable this.
llvm-svn: 199263
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Representing dllexport/dllimport as distinct linkage types prevents using
these attributes on templates and inline functions.
Instead of introducing further mixed linkage types to include linkonce and
weak ODR, the old import/export linkage types are replaced with a new
separate visibility-like specifier:
define available_externally dllimport void @f() {}
@Var = dllexport global i32 1, align 4
Linkage for dllexported globals and functions is now equal to their linkage
without dllexport. Imported globals and functions must be either
declarations with external linkage, or definitions with
AvailableExternallyLinkage.
llvm-svn: 199218
|
|
|
|
|
|
|
|
| |
Revert this for now until I fix an issue in Clang with it.
This reverts commit r199204.
llvm-svn: 199207
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Representing dllexport/dllimport as distinct linkage types prevents using
these attributes on templates and inline functions.
Instead of introducing further mixed linkage types to include linkonce and
weak ODR, the old import/export linkage types are replaced with a new
separate visibility-like specifier:
define available_externally dllimport void @f() {}
@Var = dllexport global i32 1, align 4
Linkage for dllexported globals and functions is now equal to their linkage
without dllexport. Imported globals and functions must be either
declarations with external linkage, or definitions with
AvailableExternallyLinkage.
llvm-svn: 199204
|
|
|
|
|
|
|
|
|
| |
This will allow it to be called from target independent parts of the main
streamer that don't know if there is a registered target streamer or not. This
in turn will allow targets to perform extra actions at specified points in the
interface: add extra flags for some labels, extra work during finalization, etc.
llvm-svn: 199174
|
|
|
|
|
|
|
|
|
|
| |
Targets like SPARC and MIPS have delay slots and normally bundle the
delay slot instruction with the corresponding terminator.
Teach isBlockOnlyReachableByFallthrough to find any MBB operands on
bundled terminators so SPARC doesn't need to specialize this function.
llvm-svn: 199061
|
|
|
|
| |
llvm-svn: 198981
|
|
|
|
| |
llvm-svn: 198980
|
|
|
|
| |
llvm-svn: 198979
|
|
|
|
|
|
|
|
|
| |
This reverts commit r198865 which reverts r198851.
ASan identified a use-of-uninitialized of the DwarfTypeUnit::Ty variable
in skeleton type units.
llvm-svn: 198908
|
|
|
|
|
|
| |
It caused undefined behavior. DwarfTypeUnit::Ty might not be initialized properly, I guess.
llvm-svn: 198865
|
|
|
|
| |
llvm-svn: 198851
|
|
|
|
|
|
| |
type unit skeletons.
llvm-svn: 198846
|
|
|
|
| |
llvm-svn: 198843
|
|
|
|
|
|
|
|
|
|
| |
as well.
Since we'll now also need the split dwarf file name along with the
language in DwarfTypeUnits, just use the whole DICompileUnit rather than
explicitly handling each field needed.
llvm-svn: 198842
|
|
|
|
|
|
|
|
| |
This reverts commit r198830.
Decided to go a different way with this...
llvm-svn: 198841
|
|
|
|
|
|
|
|
|
|
|
|
| |
operand into the Value interface just like the core print method is.
That gives a more conistent organization to the IR printing interfaces
-- they are all attached to the IR objects themselves. Also, update all
the users.
This removes the 'Writer.h' header which contained only a single function
declaration.
llvm-svn: 198836
|
|
|
|
|
|
| |
It's unused in DwarfTypeUnit, as is expected.
llvm-svn: 198830
|
|
|
|
|
|
| |
This makes it available to tools that don't link with target (like llvm-ar).
llvm-svn: 198708
|
|
|
|
| |
llvm-svn: 198700
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
are part of the core IR library in order to support dumping and other
basic functionality.
Rename the 'Assembly' include directory to 'AsmParser' to match the
library name and the only functionality left their -- printing has been
in the core IR library for quite some time.
Update all of the #includes to match.
All of this started because I wanted to have the layering in good shape
before I started adding support for printing LLVM IR using the new pass
infrastructure, and commandline support for the new pass infrastructure.
llvm-svn: 198688
|
|
|
|
|
|
|
|
|
|
| |
subsequent changes are easier to review. About to fix some layering
issues, and wanted to separate out the necessary churn.
Also comment and sink the include of "Windows.h" in three .inc files to
match the usage in Memory.inc.
llvm-svn: 198685
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this patch any program that wanted to know the final symbol name of a
GlobalValue had to link with Target.
This patch implements a compromise solution where the mangler uses DataLayout.
This way, any tool that already links with Target (llc, clang) gets the exact
behavior as before and new IR files can be mangled without linking with Target.
With this patch the mangler is constructed with just a DataLayout and DataLayout
is extended to include the information the Mangler needs.
llvm-svn: 198438
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IR-provided unique names.""
This reverts commit r198398, thus reapplying r198397.
I had accidentally introduced an endianness issue when applying the hash
to the type unit. Using support::ulittle64_t in the reinterpret_cast in
addDwarfTypeUnitType fixes this issue.
Original commit message:
Debug Info: Type Units: Simplify type hashing using IR-provided unique
names.
What's good for LTO metadata size problems ought to be good for non-LTO
debug info size too, so let's rely on the same uniqueness in both cases.
If it's insufficient for non-LTO for whatever reason (since we now won't
be uniquing CU-local types or any C types - but these are likely to not
be the most significant contributors to type bloat) we should consider a
frontend solution that'll help both LTO and non-LTO alike, rather than
using DWARF-level DIE-hashing that only helps non-LTO debug info size.
It's also much simpler this way and benefits C++ even more since we can
deduplicate lexically separate definitions of the same C++ type since
they have the same mangled name.
llvm-svn: 198436
|
|
|
|
|
|
|
|
|
|
|
| |
unique names."
Reverting due to bot failure I won't have time to investigate until
tomorrow.
This reverts commit r198397.
llvm-svn: 198398
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
What's good for LTO metadata size problems ought to be good for non-LTO
debug info size too, so let's rely on the same uniqueness in both cases.
If it's insufficient for non-LTO for whatever reason (since we now won't
be uniquing CU-local types or any C types - but these are likely to not
be the most significant contributors to type bloat) we should consider a
frontend solution that'll help both LTO and non-LTO alike, rather than
using DWARF-level DIE-hashing that only helps non-LTO debug info size.
It's also much simpler this way and benefits C++ even more since we can
deduplicate lexically separate definitions of the same C++ type since
they have the same mangled name.
llvm-svn: 198397
|
|
|
|
| |
llvm-svn: 198394
|
|
|
|
| |
llvm-svn: 198393
|
|
|
|
|
|
|
|
|
|
| |
The cgo problem was that it wants dwarf2 which doesn't support direct
constant encoding of the location. So let's add support for dwarf2
encoding (using a location expression) of data member locations.
This reverts commit r198385.
llvm-svn: 198389
|
|
|
|
|
|
|
| |
Apologies for the noise - we're seeing some Go failures with cgo
interacting with Clang's debug info due to this change.
llvm-svn: 198385
|
|
|
|
|
|
| |
obvious.
llvm-svn: 198361
|
|
|
|
| |
llvm-svn: 198358
|
|
|
|
| |
llvm-svn: 198357
|
|
|
|
|
|
|
|
| |
Use an if statement instead of a pair of ternary operators checking
the same condition.
Use a cheap method call rather than returning the local symbol.
llvm-svn: 198351
|
|
|
|
| |
llvm-svn: 198350
|
|
|
|
|
|
|
| |
This reverts r197927 until the discussion on llvm-commits comes to a
conclusion.
llvm-svn: 198333
|
|
|
|
| |
llvm-svn: 198233
|