Commit Graph

193191 Commits

Author SHA1 Message Date
Hal Finkel 7a0516ea66 [PowerPC] Mark jumps as expensive (using using CR bits)
On PowerPC, which has a full set of logical operations on (its multiple sets
of) condition-register bits, it is not profitable to break of complex
conditions feeding a jump into multiple jumps. We can turn off this feature of
CGP/SDAGBuilder by marking jumps as "expensive".

P7 test-suite speedups (no regressions):
MultiSource/Benchmarks/FreeBench/pcompress2/pcompress2
	-0.626647% +/- 0.323583%
MultiSource/Benchmarks/Olden/power/power
	-18.2821% +/- 8.06481%

llvm-svn: 228895
2015-02-12 01:02:52 +00:00
Alexey Samsonov 1225816a2d [Sanitizer] Change InitializeFlags() signatures. NFC.
These functions are always used to initialize singleton flags(), as
well as other global data (common_flags()).

llvm-svn: 228894
2015-02-12 00:36:42 +00:00
Alexey Samsonov c9b0ea6eec [Sanitizer] Add "final" specifier to FlagHandlerBase::Parse overrides. NFC.
llvm-svn: 228893
2015-02-12 00:36:39 +00:00
Greg Clayton 526ae040ba Make a more complete fix for always supplying an execution context when getting byte sizes from types.
There was a test in the test suite that was triggering the backtrace logging output that requested that the client pass an execution context. Sometimes we need the process for Objective C types because our static notion of the type might not align with the reality when being run in a live runtime.

Switched from an "ExecutionContext *" to an "ExecutionContextScope *" for greater ease of use.

llvm-svn: 228892
2015-02-12 00:34:25 +00:00
Zachary Turner 36f807c860 Revert "Change Path::filename_pos() to skip the drive letter."
This reverts commit 228874.  For some reason users reported
seeing Clang taking up 25+GB of memory and bringing down
machines with this change.  Reverting until we figure it out.

llvm-svn: 228890
2015-02-12 00:05:49 +00:00
Rafael Espindola bbcdb9da19 Invert the section relocation map.
It now points from rel section to section. Use it to set sh_info, avoiding
a brittle name lookup.

llvm-svn: 228889
2015-02-11 23:38:33 +00:00
Rafael Espindola 62118a1fe3 Use the existing SymbolTableIndex instead of doing a lookup. NFC.
llvm-svn: 228888
2015-02-11 23:33:46 +00:00
Rui Ueyama 30c5387983 Remove unused parameter.
llvm-svn: 228887
2015-02-11 23:22:34 +00:00
Rafael Espindola fbfbdc4377 Create the Seciton -> Rel Section map when it is first needed. NFC.
Saves a walk over every section.

llvm-svn: 228886
2015-02-11 23:17:48 +00:00
Tim Northover 02438033e8 DeadArgElim: aggregate Return assessment properly.
I mistakenly thought the liveness of each "RetVal(F, i)" depended only on F. It
actually depends on the index too, which means we need to be careful about how
the results are combined before return. In particular if a single Use returns
Live, that counts for the entire object, at the granularity we're considering.

llvm-svn: 228885
2015-02-11 23:13:11 +00:00
Rafael Espindola ef6baea74e Remove unused argument. NFC.
llvm-svn: 228884
2015-02-11 23:11:18 +00:00
David Majnemer ab2b25bc97 Unbreak buildbots
The next offset should be updated as well.

llvm-svn: 228883
2015-02-11 22:51:55 +00:00
Rafael Espindola fbd0ddf082 Don't recompute the entire section map just to add 3 entries. NFC.
llvm-svn: 228881
2015-02-11 22:41:26 +00:00
Nico Weber 1bebad1b86 Wrap to 80 columns. No behavior change.
llvm-svn: 228880
2015-02-11 22:33:32 +00:00
David Majnemer 3df3c61e91 MC, COFF: Align section contents to a four byte boundary
llvm-svn: 228879
2015-02-11 22:22:30 +00:00
Enrico Granata e630433754 On second thought, a const ValueObject& has too many limitations on what it can do. Strip the constness away
llvm-svn: 228878
2015-02-11 21:53:08 +00:00
Ilia K 47448c2162 Except only EIO errors of OSError exception in Base.deletePexpectChild() in lldbtest.py after r227086
llvm-svn: 228877
2015-02-11 21:41:58 +00:00
Reid Kleckner a593000f01 Add the 'noinline' attribute to call sites within __try bodies
LLVM doesn't support non-call exceptions, so inlining makes it harder to
catch such asynchronous exceptions.

llvm-svn: 228876
2015-02-11 21:40:48 +00:00
Samuel Benzaquen 59c8aa92b8 Add clang-tidy check google-global-names-in-headers.
Summary:
google-global-names-in-headers flags global namespace pollution in header files.
Right now it only triggers on using declarations and directives.

Reviewers: alexfh

Subscribers: curdeius

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

llvm-svn: 228875
2015-02-11 21:21:05 +00:00
Zachary Turner 3e76643a95 Change Path::filename_pos() to skip the drive letter.
For Windows, filename_pos() tries to find the filename by
searching for separators after the last :.  Instead, it should
really check for the only location that a : is valid, which is
in the second character, and search for separators after that.

llvm-svn: 228874
2015-02-11 21:16:35 +00:00
Rafael Espindola d966522377 Remove unused argument. NFC.
llvm-svn: 228873
2015-02-11 21:08:00 +00:00
Mehdi Amini 9730116bd6 Reassociate: cannot negate a INT_MIN value
Summary:
When trying to canonicalize negative constants out of
multiplication expressions, we need to check that the
constant is not INT_MIN which cannot be negated.

Reviewers: mcrosier

Reviewed By: mcrosier

Subscribers: llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 228872
2015-02-11 19:54:44 +00:00
Dimitry Andric 349e062695 [Sanitizers] The MAP_NORESERVE define has been removed in FreeBSD 11.x,
and even before that, it was never implemented.  Just define it to zero
instead, so compiler-rt can compile on FreeBSD 11 and later.

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

llvm-svn: 228871
2015-02-11 19:48:27 +00:00
Pete Cooper 05df16d809 Fix REQUIRES lines on tests from r228735. Thanks Kristof for pointing out the missing commas
llvm-svn: 228870
2015-02-11 19:45:13 +00:00
Alexey Samsonov 8812e73c63 [UBSan] Allow UBSan location to store frames returned by symbolizer.
Summary:
__ubsan::getFunctionLocation() used to issue a call to symbolizer, and
convert the result (SymbolizedStack) to one of UBSan structures:
SourceLocation, ModuleLocation or MemoryLocation. This:
(1) is inefficient: we do an extra allocation/deallocation to copy data,
while we can instead can just pass SymbolizedStack around (which
contains all the necessary data).
(2) leaks memory: strings stored in SourceLocation/MemoryLocation are
never deallocated, and Filipe Cabecinhas suggests this causes crashes
of UBSan-ified programs in the wild.

Instead, let Location store a pointer to SymbolizedStack object, and
make sure it's properly deallocated when UBSan handler exits.

ModuleLocation is made obsolete by this change, and is deleted.

Test Plan: check-ubsan test suite

Reviewers: rsmith, filcab

Subscribers: llvm-commits

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

llvm-svn: 228869
2015-02-11 19:45:07 +00:00
Johannes Doerfert 57ef179695 [FIX] Remove XFAIL again
llvm-svn: 228868
2015-02-11 19:28:39 +00:00
Greg Clayton f1be855a00 Fixed SBModule::GetUUIDString() to not use a static character buffer.
Rules for returning "const char *" from functions in the public lldb::SB* API are that you must constify the string using "ConstString(cstr).GetCString()" and return that. This puts the string into a string pool that never goes away. This is only when there is nothing that can hold onto the string. It is OK to specify that a string value lives as long as its SB class counterpart, but this should be made clear in the API if this is done. Many classes already constify their strings (symbol mangled and demangled names, variable names, type names, etc), so be sure to verify you string isn't already constified before you re-constify it. It won't do any harm to re-constify it, it will just cause you a little performance by having to rehash the string.

llvm-svn: 228867
2015-02-11 19:16:38 +00:00
Johannes Doerfert c47edb51c6 [FIX] Correctly handle scalar dependences of branch instructions
llvm-svn: 228866
2015-02-11 19:12:19 +00:00
Johannes Doerfert d594aeb248 [FIX] Fix test case that was affected by the early exit patch
llvm-svn: 228865
2015-02-11 19:11:57 +00:00
Benjamin Kramer ece036e5a8 CXXInheritance: Modernize removal of hidden virtual base class decls.
NFC.

llvm-svn: 228864
2015-02-11 19:09:16 +00:00
Reid Kleckner 4c209c7e1f Add a comdat to __clang_call_terminate
llvm-svn: 228863
2015-02-11 18:50:13 +00:00
Tobias Grosser a906ee754d Drop an assert and XFAIL two test cases
This gets the buildbot green to avoid further emails. Johannes will fix this
later in the evening.

llvm-svn: 228862
2015-02-11 18:46:33 +00:00
Tom Stellard 0648588e7d R600/SI: Disable subreg liveness
This is temporary while we try to fix a crash in the register coalescer.

llvm-svn: 228861
2015-02-11 18:24:53 +00:00
Zachary Turner 773f6da037 Update the coding standard to reflect recent changes.
This removes the rule from the LLDB coding standard about putting
a space after function names and before parentheses.  We now
conform to the LLVM style guide.  If you previously wrote
pointer->func (args), it would now be written pointer->func(args).

Using clang-format will do this automatically.

llvm-svn: 228860
2015-02-11 18:24:38 +00:00
Zachary Turner aa60e3c886 Make PipeWindows::CreateWithUniqueName() use GUIDs on Windows.
Patch by Adrian McCarthy
Differential Revision: http://reviews.llvm.org/D7509

llvm-svn: 228859
2015-02-11 18:21:28 +00:00
Johannes Doerfert 05c25c2679 Update TODO list.
llvm-svn: 228858
2015-02-11 18:18:19 +00:00
Simon Pilgrim 2a9a745328 [X86][SSE] Added dual vector truncation tests.
llvm-svn: 228857
2015-02-11 18:14:35 +00:00
Tamas Berghammer dd403fb68c Add missing check for LLDB_DISABLE_PYTHON in FormatManager
llvm-svn: 228856
2015-02-11 17:51:49 +00:00
Adrian Prantl 5f66bae411 Fix PR19351. While building up a composite type it is important to use
a non-uniqueable temporary node that is only turned into a permanent
unique or distinct node after it is finished.
Otherwise an intermediate node may get accidentally uniqued with another
node as illustrated by the testcase.

Paired commit with LLVM.

llvm-svn: 228855
2015-02-11 17:45:15 +00:00
Adrian Prantl 18a25b016e Allow DIBuilder::replaceVTableHolder() to work with temporary nodes,
tested via the clang test CodeGenCXX/vtable-holder-self-reference.cpp .

llvm-svn: 228854
2015-02-11 17:45:10 +00:00
Adrian Prantl 9a8049238e Add a trackIfUnresolved to DIBuilder::createInheritance(),
tested via the clang test CodeGenCXX/vtable-holder-self-reference.cpp .

llvm-svn: 228853
2015-02-11 17:45:08 +00:00
Adrian Prantl 534a81a9ec Generalize DIBuilder's createReplaceableForwardDecl() to a more flexible
createReplaceableCompositeType() that allows to create non-forward-declared
temporary nodes.

Paired commit with CFE.

llvm-svn: 228852
2015-02-11 17:45:05 +00:00
Johannes Doerfert 7ceb040213 Add early exits for SCoPs we did not optimize
This allows us to skip ast and code generation if we did not optimize
  a SCoP and will not generate parallel or alias annotations. The
  initial heuristic to exit is simple but allows improvements later on.

  All failing test cases have been modified to disable early exit, thus
  to keep their coverage.

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

llvm-svn: 228851
2015-02-11 17:25:09 +00:00
Tom Stellard de5b7b180a R600: Split AMDGPUPassConfig into R600PassConfig and GCNPassConfig
llvm-svn: 228850
2015-02-11 17:11:51 +00:00
Tom Stellard c65b36061a R600: Create an R600TargetMachine for pre-gcn GPUs
No functinality change. R600TargetMachine inherits from
AMDGPUTargetMachine.

llvm-svn: 228849
2015-02-11 17:11:50 +00:00
Tom Stellard 502ef4e791 R600/SI: Fix -march in test
llvm-svn: 228848
2015-02-11 17:11:48 +00:00
Johannes Doerfert 1f87f485b1 Model scalar writes with uses outside the SCoP
These write are important as they will force the scheduling and code
  generation of an otherwise trivial statement and also impose an order of
  execution needed to guarantee the correct final value for a scalar in a loop.

  Added test case modeled after ClamAV/clamscan.

llvm-svn: 228847
2015-02-11 17:02:52 +00:00
John Thompson ecd3b04cd7 Added -block-check-header-list-only option. This is a work-around for private includes that purposefully get included inside blocks.
llvm-svn: 228846
2015-02-11 16:58:36 +00:00
John Thompson 9724431c77 Centralize canonical path conversion.
llvm-svn: 228845
2015-02-11 16:45:50 +00:00
Hafiz Abid Qadeer 5bf72c46b3 Lock mutex in the same order.
SBProcess uses 2 mutexex; RunLock and APILock. Apart from 2 places, RunLock
is locked before API lock. I have fixed the 2 places where order was different.
I observed a deadlock due to this different order in lldb-mi once. Although
lldb-mi command and event thread dont run at the same time now. So it can not deadlock
there but can still be problem for some other clients.

Pre-approved by Greg in http://lists.cs.uiuc.edu/pipermail/lldb-dev/2015-February/006509.html

llvm-svn: 228844
2015-02-11 16:37:17 +00:00