Commit Graph

173309 Commits

Author SHA1 Message Date
Chandler Carruth d24465f443 [ADT] Teach PointerUnion to support assignment directly from nullptr to
clear it out.

llvm-svn: 207471
2014-04-29 00:14:27 +00:00
Reid Kleckner 982a589d3a LLVM supports TLS on Windows and we can use it from Clang
Patch by Martell Malone!

Differential Revision: http://reviews.llvm.org/D3421

llvm-svn: 207470
2014-04-29 00:11:30 +00:00
Nick Kledzik d7339b48f7 Fix cast warning
llvm-svn: 207469
2014-04-28 23:49:49 +00:00
Chandler Carruth a468b8ecaf [cleanup] Add some actual positive tests for equality. This unittest
never actually compared for equality two pointer unions that were equal.
Fortunately, things seem to work. =]

llvm-svn: 207468
2014-04-28 23:44:14 +00:00
Nick Kledzik 0c790015df Use return address register from CIE. Move DwarfInstructions::lastRestoreReg() to Register::lastDwarfRegNum().
llvm-svn: 207467
2014-04-28 23:43:21 +00:00
Chandler Carruth 275c5fc9c2 [cleanup] Make this test use a proper fixture rather than globals.
llvm-svn: 207466
2014-04-28 23:42:22 +00:00
Chandler Carruth 1284df1306 [cleanup] Fix the whitespace in this test. Notably, correct spacing
around pointer types.

llvm-svn: 207465
2014-04-28 23:37:53 +00:00
David Blaikie 6ada8e332b Remove DwarfUnit::LabelRange since it's unused.
Seems at some point the intent was to emit fission ranges_base as unique
per CU but the code today emits ranges_base as the start of the ranges
section for all CUs being compiled and all the ranges_base relative
addresses are relative to that. So removing this dead code and leaving
the status quo until there's a reason to change it (perhaps something's
faster if it has distinct ranges for each CU).

llvm-svn: 207464
2014-04-28 23:36:52 +00:00
Nick Kledzik 4141a3bca8 No need to specialize DwarfInstructions::getCFA(). It is the same for all archs
llvm-svn: 207463
2014-04-28 23:12:37 +00:00
Chandler Carruth c71b2c3c7f Revert r207271 for now. This commit introduced a test case that ran
clang directly from the LLVM test suite! That doesn't work. I've
followed up on the review thread to try and get a viable solution sorted
out, but trying to get the tree clean here.

llvm-svn: 207462
2014-04-28 23:07:49 +00:00
Alexey Samsonov a08b161970 [DWARF parser] DWARFDebugFrame: Make FrameEntry struct smaller.
FrameEntry doesn't need to hold a reference to the section it is
located in. Instead, pass DataExtractor as an argument of parsing
function.

No functionality change.

llvm-svn: 207461
2014-04-28 23:00:06 +00:00
David Blaikie b2133cb88d AddressPool::HasBeenUsed: Add comment explaining the use-case for this flag.
Based on code review by Eric Christopher on r207323

llvm-svn: 207460
2014-04-28 22:52:50 +00:00
Alexey Samsonov e0d954d51d [DWARF parser] DWARFDebugFrame: use unique_ptr instead of raw pointer
llvm-svn: 207459
2014-04-28 22:52:24 +00:00
David Blaikie 46f8201187 DIE: Document some learnings about why the world isn't perfect.
llvm-svn: 207458
2014-04-28 22:41:39 +00:00
Alexey Samsonov fee0ee24c8 [DWARF parser] Simplify DWARFDebugAranges generation.
There is no need to keep the whole contents of .debug_aranges section
in memory when we build address ranges table. Memory optimization that
used to be in this code (precalculate the size of vector of ranges before
filling it) is not really needed - later we will compact and resize this
vector anyway.

llvm-svn: 207457
2014-04-28 22:27:46 +00:00
David Blaikie d67ffe8b73 Satisfy sub-optimal GCC warning.
(Clang doesn't warn here because it knows the string is benign - the
assert still checks what it's intended to - though putting the correct
parens does make clang-format format the code a little better)

llvm-svn: 207456
2014-04-28 22:27:26 +00:00
Eric Christopher 83dd2fad2a We already calculate WideVT above, just reuse it.
Patch by Jan Vesely <jan.vesely@rutgers.edu>.

llvm-svn: 207455
2014-04-28 22:24:57 +00:00
Paul Robinson f44157d6ab When Driver::generateCompilationDiagnostics is filtering the list of
inputs to the preprocessor, check for invalid types first because not
all linker inputs have an option value to retrieve.

llvm-svn: 207454
2014-04-28 22:24:44 +00:00
Eli Bendersky 3468d9d929 Move all CUDA testing inputs to Inputs/ subdirectory inside the tests.
llvm-svn: 207453
2014-04-28 22:21:28 +00:00
Eli Bendersky 6ae9883eeb Add (...) around && clause to appeace gcc 4.8's warning
llvm-svn: 207452
2014-04-28 22:19:12 +00:00
David Majnemer 27d69dbbd0 CodeGen: Fix linkage of reference temporaries
Summary:
A reference temporary should inherit the linkage of the variable it
initializes.  Otherwise, we may hit cases where a reference temporary
wouldn't have the same value in all translation units.

Reviewers: rsmith

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D3515

llvm-svn: 207451
2014-04-28 22:17:59 +00:00
Dan Liew 923cecab5c Teach add_sphinx_target() to respect the LLVM_INSTALL_TOOLCHAIN_ONLY CMake
option.

llvm-svn: 207450
2014-04-28 22:06:20 +00:00
Ed Maste abb813275f Address warnings in EmulateInstructionARM64
- Remove default for switch which covers all enumeration values

- Remove unused functions
  LSL_C is left in the source under #if 0, as it may be needed in the
  future for emulating other instructions.

Differential Revision: http://reviews.llvm.org/D3528

llvm-svn: 207449
2014-04-28 21:34:04 +00:00
David Blaikie bd57905321 DebugInfo: Just store the DIE by value in the DwarfUnit
Since all 4 ctor calls in DwarfDebug just pass in a trivially
constructed DIE with the right tag type, sink the tag selection down
into the Dwarf*Unit ctors (removing the argument entirely from callers
in DwarfDebug) and initialize the DIE member in DwarfUnit.

llvm-svn: 207448
2014-04-28 21:14:27 +00:00
David Blaikie 92a2f8a836 Pass DIEs to DwarfUnit constructors by unique_ptr.
llvm-svn: 207447
2014-04-28 21:04:29 +00:00
Justin Bogner f24d9c9158 [cleanup] Fix an 80-column violation
llvm-svn: 207446
2014-04-28 20:58:58 +00:00
Rafael Espindola bc91d7e25a Add an option for evaluating past symbols.
When evaluating an assembly expression for a relocation, we want to
stop at MCSymbols that are in the symbol table, even if they are variables.
This is needed since the semantics may require that the relocation use them.

That is not the case when computing the value of a symbol in the symbol table.
There are no relocations in this case and we have to keep going until we hit
a section or find out that the expression doesn't have an assembly time
value.

llvm-svn: 207445
2014-04-28 20:53:11 +00:00
Eric Christopher 793c7479b5 Reformat, 80-col, tab characters, etc.
llvm-svn: 207444
2014-04-28 20:42:22 +00:00
Alexey Samsonov d94e87db3f [Sanitizer] Add rudimentary support for wide-character strings to scanf/printf interceptors
llvm-svn: 207443
2014-04-28 20:40:25 +00:00
David Blaikie f244922f43 Improve explicit memory ownership of DIEs
Now that the subtle constructScopeDIE has been refactored into two
functions - one returning memory to take ownership of, one returning a
pointer to already owning memory - push unique_ptr through more APIs.

I think this completes most of the unique_ptr ownership of DIEs.

llvm-svn: 207442
2014-04-28 20:36:45 +00:00
David Blaikie d8f0ac7b4a DwarfDebug: Omit DW_AT_object_pointer on inlined_subroutines
While refactoring out constructScopeDIE into two functions I realized we
were emitting DW_AT_object_pointer in the inlined subroutine when we
didn't need to (GCC doesn't, and the abstract subprogram definition has
the information already).

So here's the refactoring and the bug fix. This is one step of
refactoring to remove some subtle memory ownership semantics. It turns
out the original constructScopeDIE returned ownership in its return
value in some cases and not in others. The split into two functions now
separates those two semantics - further cleanup (unique_ptr, etc) will
follow.

llvm-svn: 207441
2014-04-28 20:27:02 +00:00
Duncan P. N. Exon Smith 295b5e7481 blockfreq: Remove more extra typenames from r207438
llvm-svn: 207440
2014-04-28 20:22:29 +00:00
Duncan P. N. Exon Smith a375e711f6 blockfreq: Remove extra typename from r207438
llvm-svn: 207439
2014-04-28 20:08:23 +00:00
Duncan P. N. Exon Smith c5a3139ebd Reapply "blockfreq: Approximate irreducible control flow"
This reverts commit r207287, reapplying r207286.

I'm hoping that declaring an explicit struct and instantiating
`addBlockEdges()` directly works around the GCC crash from r207286.
This is a lot more boilerplate, though.

llvm-svn: 207438
2014-04-28 20:02:29 +00:00
Simon Atanasyan 0804610e9f [Mips] Rename the test case.
llvm-svn: 207437
2014-04-28 19:34:46 +00:00
Simon Atanasyan 9b5e5d7942 [Mips] Rewrite the R_MIPS_COPY relocation test using yaml2obj tool.
llvm-svn: 207436
2014-04-28 19:34:39 +00:00
Simon Atanasyan 15dce7a8f3 [Mips] Convert MipsDynamicSymbolTable to the class template.
llvm-svn: 207435
2014-04-28 19:34:34 +00:00
Simon Atanasyan 0053796a08 [Mips] Add the 'const' qualifier to the couple RelocationPass class
member functions.

llvm-svn: 207434
2014-04-28 19:34:27 +00:00
Chad Rosier 136d67dc64 [driver] Disable the slp vectorizer at -O0, -O1, and -Oz. This mirrors the
behavior of the loop vectorizer, which is enabled at -O2, -O3, -O4, -Ofast
and -Os.
PR19568

llvm-svn: 207433
2014-04-28 19:30:57 +00:00
Quentin Colombet 50efe87e5b [X86] Add more details in the comments of X86TargetLowering::getScalingFactorCost.
llvm-svn: 207432
2014-04-28 18:39:57 +00:00
Reid Kleckner 64e7a03f24 lld: Silence CMake warning about a target that doesn't exist
lld-test.deps doesn't exist in a non-standalone build.

llvm-svn: 207431
2014-04-28 18:34:11 +00:00
Juergen Ributzka 4989255432 [PM] Add pass run listeners to the pass manager.
This commit provides the necessary C/C++ APIs and infastructure to enable fine-
grain progress report and safe suspension points after each pass in the pass
manager.

Clients can provide a callback function to the pass manager to call after each
pass. This can be used in a variety of ways (progress report, dumping of IR
between passes, safe suspension of threads, etc).

The run listener list is maintained in the LLVMContext, which allows a multi-
threaded client to be only informed for it's own thread. This of course assumes
that the client created a LLVMContext for each thread.

This fixes <rdar://problem/16728690>

llvm-svn: 207430
2014-04-28 18:19:25 +00:00
Joerg Sonnenberger 4482dcd072 Fix comment
llvm-svn: 207429
2014-04-28 18:11:51 +00:00
Peter Collingbourne b2f70c7a4b Modify the assertion in DIBuilder.cpp to cover the DWARF 5 languages
Differential Revision: http://reviews.llvm.org/D3523

llvm-svn: 207428
2014-04-28 18:11:01 +00:00
Nico Weber 47d387c9ec Remove unused using statement.
llvm-svn: 207427
2014-04-28 17:54:37 +00:00
Hans Wennborg e36e116826 InstCombine: don't drop 'inalloca' in PromoteCastOfAllocation (PR19569)
llvm-svn: 207426
2014-04-28 17:40:03 +00:00
Rafael Espindola 6efaf1182b Simplify ELFObjectWriter::ExecutePostLayoutBinding.
No functionality change. This removes the last use of AliasedSymbol in
ELFObjectWriter.cpp.

llvm-svn: 207424
2014-04-28 17:05:36 +00:00
Chad Rosier 0def8e2652 [ARM64] Fix an issue where we were always assuming a copy was coming from a D subregister.
llvm-svn: 207423
2014-04-28 16:21:50 +00:00
Aaron Ballman 35897d97a3 Renaming range-based for loop variables so they don't appear iterator-like.
llvm-svn: 207422
2014-04-28 14:56:59 +00:00
Rafael Espindola 39f50421e3 Simplify isLocal().
No functionality change.

llvm-svn: 207421
2014-04-28 14:24:44 +00:00