Steven Wu [Thu, 12 Feb 2015 02:06:55 +0000 (02:06 +0000)]
Add InlineAsmDiagnosticHandler for bitcode input
Summary:
This patch installs an InlineAsmDiagnosticsHandler to avoid the crash
report when the input is bitcode and the bitcode contains invalid inline
assembly. The handler will simply print the same error message that will
print from the backend.
Add CHECK in test-case
Reviewers: echristo, rafael
Reviewed By: rafael
Subscribers: rafael, cfe-commits
Differential Revision: http://reviews.llvm.org/D7568
llvm-svn: 228898
Richard Smith [Thu, 12 Feb 2015 01:55:09 +0000 (01:55 +0000)]
More for DR1467: In C++, when initializing an element of an aggregate,
always use the normal copy-initialization rules. Remove a special case that
tries to stay within the list initialization checker here; that makes us do the
wrong thing when list-initialization of an aggregate would not perform
aggregate initialization.
llvm-svn: 228897
Richard Smith [Thu, 12 Feb 2015 01:50:05 +0000 (01:50 +0000)]
Improve the "braces around scalar init" warning to determine whether to warn
based on whether "redundant" braces are ever reasonable as part of the
initialization of the entity, rather than whether the initialization is
"top-level". In passing, add a warning flag for it.
llvm-svn: 228896
Hal Finkel [Thu, 12 Feb 2015 01:02:52 +0000 (01:02 +0000)]
[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
Alexey Samsonov [Thu, 12 Feb 2015 00:36:42 +0000 (00:36 +0000)]
[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
Alexey Samsonov [Thu, 12 Feb 2015 00:36:39 +0000 (00:36 +0000)]
[Sanitizer] Add "final" specifier to FlagHandlerBase::Parse overrides. NFC.
llvm-svn: 228893
Greg Clayton [Thu, 12 Feb 2015 00:34:25 +0000 (00:34 +0000)]
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
Zachary Turner [Thu, 12 Feb 2015 00:05:49 +0000 (00:05 +0000)]
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
Rafael Espindola [Wed, 11 Feb 2015 23:38:33 +0000 (23:38 +0000)]
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
Rafael Espindola [Wed, 11 Feb 2015 23:33:46 +0000 (23:33 +0000)]
Use the existing SymbolTableIndex instead of doing a lookup. NFC.
llvm-svn: 228888
Rui Ueyama [Wed, 11 Feb 2015 23:22:34 +0000 (23:22 +0000)]
Remove unused parameter.
llvm-svn: 228887
Rafael Espindola [Wed, 11 Feb 2015 23:17:48 +0000 (23:17 +0000)]
Create the Seciton -> Rel Section map when it is first needed. NFC.
Saves a walk over every section.
llvm-svn: 228886
Tim Northover [Wed, 11 Feb 2015 23:13:11 +0000 (23:13 +0000)]
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
Rafael Espindola [Wed, 11 Feb 2015 23:11:18 +0000 (23:11 +0000)]
Remove unused argument. NFC.
llvm-svn: 228884
David Majnemer [Wed, 11 Feb 2015 22:51:55 +0000 (22:51 +0000)]
Unbreak buildbots
The next offset should be updated as well.
llvm-svn: 228883
Rafael Espindola [Wed, 11 Feb 2015 22:41:26 +0000 (22:41 +0000)]
Don't recompute the entire section map just to add 3 entries. NFC.
llvm-svn: 228881
Nico Weber [Wed, 11 Feb 2015 22:33:32 +0000 (22:33 +0000)]
Wrap to 80 columns. No behavior change.
llvm-svn: 228880
David Majnemer [Wed, 11 Feb 2015 22:22:30 +0000 (22:22 +0000)]
MC, COFF: Align section contents to a four byte boundary
llvm-svn: 228879
Enrico Granata [Wed, 11 Feb 2015 21:53:08 +0000 (21:53 +0000)]
On second thought, a const ValueObject& has too many limitations on what it can do. Strip the constness away
llvm-svn: 228878
Ilia K [Wed, 11 Feb 2015 21:41:58 +0000 (21:41 +0000)]
Except only EIO errors of OSError exception in Base.deletePexpectChild() in lldbtest.py after r227086
llvm-svn: 228877
Reid Kleckner [Wed, 11 Feb 2015 21:40:48 +0000 (21:40 +0000)]
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
Samuel Benzaquen [Wed, 11 Feb 2015 21:21:05 +0000 (21:21 +0000)]
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
Zachary Turner [Wed, 11 Feb 2015 21:16:35 +0000 (21:16 +0000)]
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
Rafael Espindola [Wed, 11 Feb 2015 21:08:00 +0000 (21:08 +0000)]
Remove unused argument. NFC.
llvm-svn: 228873
Mehdi Amini [Wed, 11 Feb 2015 19:54:44 +0000 (19:54 +0000)]
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
Dimitry Andric [Wed, 11 Feb 2015 19:48:27 +0000 (19:48 +0000)]
[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
Pete Cooper [Wed, 11 Feb 2015 19:45:13 +0000 (19:45 +0000)]
Fix REQUIRES lines on tests from r228735. Thanks Kristof for pointing out the missing commas
llvm-svn: 228870
Alexey Samsonov [Wed, 11 Feb 2015 19:45:07 +0000 (19:45 +0000)]
[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
Johannes Doerfert [Wed, 11 Feb 2015 19:28:39 +0000 (19:28 +0000)]
[FIX] Remove XFAIL again
llvm-svn: 228868
Greg Clayton [Wed, 11 Feb 2015 19:16:38 +0000 (19:16 +0000)]
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
Johannes Doerfert [Wed, 11 Feb 2015 19:12:19 +0000 (19:12 +0000)]
[FIX] Correctly handle scalar dependences of branch instructions
llvm-svn: 228866
Johannes Doerfert [Wed, 11 Feb 2015 19:11:57 +0000 (19:11 +0000)]
[FIX] Fix test case that was affected by the early exit patch
llvm-svn: 228865
Benjamin Kramer [Wed, 11 Feb 2015 19:09:16 +0000 (19:09 +0000)]
CXXInheritance: Modernize removal of hidden virtual base class decls.
NFC.
llvm-svn: 228864
Reid Kleckner [Wed, 11 Feb 2015 18:50:13 +0000 (18:50 +0000)]
Add a comdat to __clang_call_terminate
llvm-svn: 228863
Tobias Grosser [Wed, 11 Feb 2015 18:46:33 +0000 (18:46 +0000)]
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
Tom Stellard [Wed, 11 Feb 2015 18:24:53 +0000 (18:24 +0000)]
R600/SI: Disable subreg liveness
This is temporary while we try to fix a crash in the register coalescer.
llvm-svn: 228861
Zachary Turner [Wed, 11 Feb 2015 18:24:38 +0000 (18:24 +0000)]
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
Zachary Turner [Wed, 11 Feb 2015 18:21:28 +0000 (18:21 +0000)]
Make PipeWindows::CreateWithUniqueName() use GUIDs on Windows.
Patch by Adrian McCarthy
Differential Revision: http://reviews.llvm.org/D7509
llvm-svn: 228859
Johannes Doerfert [Wed, 11 Feb 2015 18:18:19 +0000 (18:18 +0000)]
Update TODO list.
llvm-svn: 228858
Simon Pilgrim [Wed, 11 Feb 2015 18:14:35 +0000 (18:14 +0000)]
[X86][SSE] Added dual vector truncation tests.
llvm-svn: 228857
Tamas Berghammer [Wed, 11 Feb 2015 17:51:49 +0000 (17:51 +0000)]
Add missing check for LLDB_DISABLE_PYTHON in FormatManager
llvm-svn: 228856
Adrian Prantl [Wed, 11 Feb 2015 17:45:15 +0000 (17:45 +0000)]
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
Adrian Prantl [Wed, 11 Feb 2015 17:45:10 +0000 (17:45 +0000)]
Allow DIBuilder::replaceVTableHolder() to work with temporary nodes,
tested via the clang test CodeGenCXX/vtable-holder-self-reference.cpp .
llvm-svn: 228854
Adrian Prantl [Wed, 11 Feb 2015 17:45:08 +0000 (17:45 +0000)]
Add a trackIfUnresolved to DIBuilder::createInheritance(),
tested via the clang test CodeGenCXX/vtable-holder-self-reference.cpp .
llvm-svn: 228853
Adrian Prantl [Wed, 11 Feb 2015 17:45:05 +0000 (17:45 +0000)]
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
Johannes Doerfert [Wed, 11 Feb 2015 17:25:09 +0000 (17:25 +0000)]
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
Tom Stellard [Wed, 11 Feb 2015 17:11:51 +0000 (17:11 +0000)]
R600: Split AMDGPUPassConfig into R600PassConfig and GCNPassConfig
llvm-svn: 228850
Tom Stellard [Wed, 11 Feb 2015 17:11:50 +0000 (17:11 +0000)]
R600: Create an R600TargetMachine for pre-gcn GPUs
No functinality change. R600TargetMachine inherits from
AMDGPUTargetMachine.
llvm-svn: 228849
Tom Stellard [Wed, 11 Feb 2015 17:11:48 +0000 (17:11 +0000)]
R600/SI: Fix -march in test
llvm-svn: 228848
Johannes Doerfert [Wed, 11 Feb 2015 17:02:52 +0000 (17:02 +0000)]
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
John Thompson [Wed, 11 Feb 2015 16:58:36 +0000 (16:58 +0000)]
Added -block-check-header-list-only option. This is a work-around for private includes that purposefully get included inside blocks.
llvm-svn: 228846
John Thompson [Wed, 11 Feb 2015 16:45:50 +0000 (16:45 +0000)]
Centralize canonical path conversion.
llvm-svn: 228845
Hafiz Abid Qadeer [Wed, 11 Feb 2015 16:37:17 +0000 (16:37 +0000)]
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
Marshall Clow [Wed, 11 Feb 2015 16:14:01 +0000 (16:14 +0000)]
Change some template parameter names from _C and _N to _Cont and _Sz. No functionality change.
llvm-svn: 228843
Jan Wen Voung [Wed, 11 Feb 2015 16:12:50 +0000 (16:12 +0000)]
Gold-plugin: Broaden scope of get/release_input_file to scope of Module.
Summary:
Move calls to get_input_file and release_input_file out of
getModuleForFile(). Otherwise release_input_file may end up
unmapping a view of the file while the view is still being
used by the Module (on 32-bit hosts).
Fix for PR22482.
Test Plan: Add test using --no-map-whole-files.
Reviewers: rafael, nlewycky
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7539
llvm-svn: 228842
Jonas Paulsson [Wed, 11 Feb 2015 16:10:31 +0000 (16:10 +0000)]
Fix SelectionDAG compile time issue with alias analysis.
Add new token factor node and its users to worklist if alias analysis is
turned on, in DAGCombiner::visitTokenFactor(). Alias analysis may cause
a lot of new token factors to be inserted into the DAG, and they need to
be optimized to avoid significant slow-downs.
Reviewed by Hal Finkel.
llvm-svn: 228841
Marshall Clow [Wed, 11 Feb 2015 15:48:21 +0000 (15:48 +0000)]
Need to wrap a bit in an ifdef, since there are no initializer_lists in C++03
llvm-svn: 228840
Marshall Clow [Wed, 11 Feb 2015 15:41:34 +0000 (15:41 +0000)]
Fix PR 22541: When values are equal, minmax should return the rightmost one in the initializer_list
llvm-svn: 228839
Timur Iskhodzhanov [Wed, 11 Feb 2015 15:21:09 +0000 (15:21 +0000)]
[ASan] Print out a diagnostic when a global is unregistered
llvm-svn: 228838
Denis Protivensky [Wed, 11 Feb 2015 15:02:43 +0000 (15:02 +0000)]
[ELF][ARM] Fix veneer symbol names in Release build
The fix is for r228680.
This makes tests also work.
llvm-svn: 228837
Sanjay Patel [Wed, 11 Feb 2015 15:00:41 +0000 (15:00 +0000)]
fixed to test features, not CPUs
llvm-svn: 228836
Sanjay Patel [Wed, 11 Feb 2015 15:00:19 +0000 (15:00 +0000)]
fixed to test features, not CPUs
llvm-svn: 228835
Sanjay Patel [Wed, 11 Feb 2015 14:58:25 +0000 (14:58 +0000)]
fixed to test features, not CPUs
llvm-svn: 228834
Johannes Doerfert [Wed, 11 Feb 2015 14:54:50 +0000 (14:54 +0000)]
Allow signed devision in access functions
llvm-svn: 228833
Johannes Doerfert [Wed, 11 Feb 2015 14:52:52 +0000 (14:52 +0000)]
[FIX] Special case for branch users of scalar values
llvm-svn: 228832
Rafael Espindola [Wed, 11 Feb 2015 14:44:17 +0000 (14:44 +0000)]
Don't repeat name in comment and clang-format a function.
llvm-svn: 228831
Marek Olsak [Wed, 11 Feb 2015 14:26:46 +0000 (14:26 +0000)]
R600/SI: Enable a lot of existing tests for VI (squashed commits)
This is a union of these commits:
* R600/SI: Enable more tests for VI which need no changes
* R600/SI: Enable V_BCNT tests for VI
Differences:
- v_bcnt_..._e32 -> _e64
- s_load_dword* inline offset is in bytes instead of dwords
* R600/SI: Enable all tests for VI which use S_LOAD_DWORD
The inline offset is changed from dwords to bytes.
* R600/SI: Enable LDS tests for VI
Differences:
- the s_load_dword inline offset changed from dwords to bytes
- the tests checked very little on CI, so they have been fixed to check all
instructions that "SI" checked
* R600/SI: Enable lshr tests for VI
* R600/SI: Fix divrem64 tests
- "v_lshl_64" was missing "b" before "64"
- added VI-NOT checks
* R600/SI: Enable the SI.tid test for VI
* R600/SI: Enable the frem test for VI
Also, the frem_f64 checking is added for CI-VI.
* R600/SI: Add VI tests for rsq.clamped
llvm-svn: 228830
Andrea Di Biagio [Wed, 11 Feb 2015 14:22:18 +0000 (14:22 +0000)]
[TTI] Improved cost heuristic for cttz/ctlz calls.
This patch is a follow-up of r228826 (see code-review: D7506).
Now that SimplifyCFG uses TargetTransformInfo for cost analysis, we
have to fix the cost heuristic for intrinsic calls to cttz/ctlz.
This patch defines method 'getIntrinsicCost' in BasicTTIImpl: now, BasicTTIImpl
queries TLI to check if a call to cttz/ctlz is cheap for the target.
Added test cases in Transforms/SimplifyCFG/X86 to verify that on x86,
SimplifyCFG only speculates a call to cttz/ctlz if it is cheap.
Differential Revision: http://reviews.llvm.org/D7554
llvm-svn: 228829
Tamas Berghammer [Wed, 11 Feb 2015 12:52:55 +0000 (12:52 +0000)]
Fix windows build (broken by r228823)
llvm-svn: 228828
James Molloy [Wed, 11 Feb 2015 12:24:09 +0000 (12:24 +0000)]
Make buildbots better.
This testcase change was associated incorrectly to a followup commit in my git tree, not the base commit. Sorry!
llvm-svn: 228827
James Molloy [Wed, 11 Feb 2015 12:15:41 +0000 (12:15 +0000)]
[SimplifyCFG] Swap to using TargetTransformInfo for cost
analysis.
We're already using TTI in SimplifyCFG, so remove the hard-baked "cheapness"
heuristic and use TTI directly. Generally NFC intended, but we're using a slightly
different heuristic now so there is a slight test churn.
Test changes:
* combine-comparisons-by-cse.ll: Removed unneeded branch check.
* 2014-08-04-muls-it.ll: Test now doesn't branch but emits muleq.
* coalesce-subregs.ll: Superfluous block check.
* 2008-01-02-hoist-fp-add.ll: fadd is safe to speculate. Change to udiv.
* PhiBlockMerge.ll: Superfluous CFG checking code. Main checks still present.
* select-gep.ll: A variable GEP is not expensive, just TCC_Basic, according to the TTI.
llvm-svn: 228826
Daniel Sanders [Wed, 11 Feb 2015 11:28:56 +0000 (11:28 +0000)]
[mips] Merge disassemblers into a single implementation.
Summary:
Currently we have Mips32 and Mips64 disassemblers and this causes the target
triple to affect the disassembly despite all the relevant information being in
the ELF header. These implementations do not need to be separate.
This patch merges them together such that the appropriate tables are checked
for the subtarget (e.g. Mips64 is checked when GP64 is enabled).
Reviewers: vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7498
llvm-svn: 228825
Ilia K [Wed, 11 Feb 2015 11:24:20 +0000 (11:24 +0000)]
Add extra check that target was stopped before the *stopped is sent.
This patch fixes r228417. It's required because eStateCrushed case wasn't investigated.
llvm-svn: 228824
Tamas Berghammer [Wed, 11 Feb 2015 10:29:30 +0000 (10:29 +0000)]
Separate monolithic GDBRemoteCommunicationServer class into 4 part
GDBRemoteCommunicationServer: Basic packet handling, handler registration
LLDBCommonPacketHandler: Common packet handling for lldb-platform and lldb-gdbserver
LLDBPlatformPacketHandler: lldb-platform specific packet handling
LLGSPacketHandler: lldb-gdbserver specific packet handling
Differential Revision: http://reviews.llvm.org/D7538
llvm-svn: 228823
Hafiz Abid Qadeer [Wed, 11 Feb 2015 10:14:13 +0000 (10:14 +0000)]
Fix Mingw build.
Following changes are done.
Add missing headers.
Replace _snprintf with snprintf. It is already changed to _snprintf for MSVC.
Add a file in the build for autoconf.
Call DynamicLoaderWindows::Terminate and DynamicLoaderWindows::Initialize only for MSVC build.
Reviewed in http://reviews.llvm.org/D7536.
llvm-svn: 228822
James Molloy [Wed, 11 Feb 2015 09:19:47 +0000 (09:19 +0000)]
[LoopReroll] Introduce the concept of DAGRootSets.
A DAGRootSet models an induction variable being used in a rerollable
loop. For example:
x[i*3+0] = y1
x[i*3+1] = y2
x[i*3+2] = y3
Base instruction -> i*3
+---+----+
/ | \
ST[y1] +1 +2 <-- Roots
| |
ST[y2] ST[y3]
There may be multiple DAGRootSets, for example:
x[i*2+0] = ... (1)
x[i*2+1] = ... (1)
x[i*2+4] = ... (2)
x[i*2+5] = ... (2)
x[(i+1234)*2+5678] = ... (3)
x[(i+1234)*2+5679] = ... (3)
This concept is similar to the "Scale" member used previously, but allows
multiple independent sets of roots based off the same induction variable.
llvm-svn: 228821
David Majnemer [Wed, 11 Feb 2015 09:13:11 +0000 (09:13 +0000)]
AsmParser: Validate alloca's type
An alloca's type should be weird things like metadata.
llvm-svn: 228820
David Majnemer [Wed, 11 Feb 2015 09:13:09 +0000 (09:13 +0000)]
DataLayout: Report when the preferred alignment is less than the ABI
llvm-svn: 228819
David Majnemer [Wed, 11 Feb 2015 09:13:06 +0000 (09:13 +0000)]
Verifier: Check for null operands in !llvm.module.flags
llvm-svn: 228818
Michael Kuperstein [Wed, 11 Feb 2015 08:53:55 +0000 (08:53 +0000)]
[X86] Split information collection from actual transformation in call frame optimization
This splits collecting information from actually performing the transformation, so that we can add a heuristic in between the two.
NFC.
Differential Revision: http://reviews.llvm.org/D7497
llvm-svn: 228817
Arnaud A. de Grandmaison [Wed, 11 Feb 2015 08:25:36 +0000 (08:25 +0000)]
[PBQP] Cautiously update edge costs in the solver
The NodeMetadata are maintained in an incremental way. When an edge between
2 nodes has its cost updated, in the course of graph reduction for example,
the NodeMetadata need first to have the old edge cost removed, then the new
edge cost added. Only once the NodeMetadata have been fully updated, it
becomes safe to consider promoting the nodes to the
ConservativelyAllocatable or OptimallyReducible sets. Previously, this
promotion was occuring right after the removing the old cost, and this was
breaking the assumption that a ConservativelyAllocatable should not be
spilled.
This patch also adds asserts to:
- enforces the invariant that a node's reduction can not be downgraded,
- only not provably allocatable or optimally reducible nodes can be spilled.
llvm-svn: 228816
David Majnemer [Wed, 11 Feb 2015 08:23:20 +0000 (08:23 +0000)]
Verifier: Make sure !llvm.ident's operand isn't null
llvm-svn: 228815
Alex Denisov [Wed, 11 Feb 2015 07:56:16 +0000 (07:56 +0000)]
Fix amount of diagnostic classes
llvm-svn: 228814
David Majnemer [Wed, 11 Feb 2015 07:43:58 +0000 (07:43 +0000)]
AsmParser: Don't crash when insertvalue has bad operands
llvm-svn: 228813
David Majnemer [Wed, 11 Feb 2015 07:43:56 +0000 (07:43 +0000)]
AsmParser: Switch some vectors to maps
This speeds up parsing .ll files with metadata nodes with large IDs.
llvm-svn: 228812
Peter Collingbourne [Wed, 11 Feb 2015 05:58:57 +0000 (05:58 +0000)]
Fix build for CMake < 2.8.12.
llvm-svn: 228810
Saleem Abdulrasool [Wed, 11 Feb 2015 05:20:53 +0000 (05:20 +0000)]
unwind: tweak inclusion ordering to work around GCC
This is a slightly convoluted workaround. GCC does not support the
__has_feature extension of clang, and this results in some issues with
static_asserts. config.h defines static_assert as a macro with a C-specific
trickery. This then propagates into the C++ headers included after config.h,
which are used with C++11 mode, enabling constexpr constructors. The macro'ed
static_assert does not get treated as the static_assert builtin, and will cause
an error due to a non-empty constexpr constructor. Tweaking the include order
permits the use of libc++ headers to build libunwind with GCC on Linux.
llvm-svn: 228809
Saleem Abdulrasool [Wed, 11 Feb 2015 05:20:50 +0000 (05:20 +0000)]
unwind: clean up some -Werror=return-type warnings
Mark that the functions always return or abort if the register class is
unhandled. Avoid placing the abort in the switch to permit -Wswitch-cover to
catch missing values.
llvm-svn: 228808
Saleem Abdulrasool [Wed, 11 Feb 2015 05:20:47 +0000 (05:20 +0000)]
unwind: clean up more -Wformat warnings
This makes compilation on ARM -Wformat clean with GCC. NFC.
llvm-svn: 228807
Saleem Abdulrasool [Wed, 11 Feb 2015 05:20:44 +0000 (05:20 +0000)]
unwind: clean up straggling -Wundef warning
Conservatively define __ARM_ARCH to 4 in the case that it is undefined (e.g.
with GCC).
llvm-svn: 228806
Saleem Abdulrasool [Wed, 11 Feb 2015 05:20:42 +0000 (05:20 +0000)]
unwind: silence -Wconversion warnings
Clean up implicit uint8_t to uint32_t conversion warnings identified by GCC.
llvm-svn: 228805
Ilia K [Wed, 11 Feb 2015 05:02:44 +0000 (05:02 +0000)]
Clean up test/tools/lldb-mi/TestMiNotification.py (MI)
llvm-svn: 228804
Ilia K [Wed, 11 Feb 2015 04:58:41 +0000 (04:58 +0000)]
Fix segfault notification in lldb-mi
Summary:
This patch adds system exception handling in lldb-mi + tests.
All tests pass on OS X.
Reviewers: zturner, abidh, clayborg
Reviewed By: clayborg
Subscribers: emaste, lldb-commits, zturner, clayborg, abidh
Differential Revision: http://reviews.llvm.org/D7500
llvm-svn: 228803
Ilia K [Wed, 11 Feb 2015 04:52:54 +0000 (04:52 +0000)]
Fix CMIUtilString::SplitConsiderQuotes (MI)
Summary:
This method doesn't work properly. Here is an example:
```
CMIUtilString test("\"hello\" \"\\\" world \\\" !\"");
CMIUtilString::VecString_t res;
test.SplitConsiderQuotes(" ", res);
```
Before this patch the result was as following:
```
(lldb) print res
(CMIUtilString::VecString_t) $1 = size=4 {
[0] = (std::__1::string = "\"hello\"")
[1] = (std::__1::string = "\"\\\"")
[2] = (std::__1::string = "world")
[3] = (std::__1::string = "\\\" !\"")
}
```
This patch fixes that error and now it looks like following:
```
(lldb) print res
(CMIUtilString::VecString_t) $1 = size=2 {
[0] = (std::__1::string = "\"hello\"")
[1] = (std::__1::string = "\"\\\" world \\\" !\"")
}
```
Reviewers: abidh, emaste, clayborg
Reviewed By: clayborg
Subscribers: lldb-commits, emaste, clayborg, abidh
Differential Revision: http://reviews.llvm.org/D7532
llvm-svn: 228802
Ilia K [Wed, 11 Feb 2015 04:51:41 +0000 (04:51 +0000)]
Close terminal after LaunchInTerminalTestCase test
Summary:
The test_launch_in_terminal test leaves a running terminal.
This patch adds "exit" after debugging with eLaunchFlagLaunchInTTY flag.
Reviewers: jingham, zturner, clayborg
Reviewed By: clayborg
Subscribers: emaste, vharron, lldb-commits, clayborg, jingham, zturner
Differential Revision: http://reviews.llvm.org/D7468
llvm-svn: 228801
Zachary Turner [Wed, 11 Feb 2015 03:28:02 +0000 (03:28 +0000)]
Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects.
This allows IDEs to recognize the entire set of header files for
each of the core LLVM projects.
Differential Revision: http://reviews.llvm.org/D7526
Reviewed By: Chris Bieneman
llvm-svn: 228798
Justin Bogner [Wed, 11 Feb 2015 03:05:02 +0000 (03:05 +0000)]
Revert "[UBSan] Enable -Wglobal-constructors."
We're still using global constructors when not on linux, so this was
causing warnings on Darwin. Reverting for now.
This reverts r228384.
llvm-svn: 228795
Justin Bogner [Wed, 11 Feb 2015 02:53:03 +0000 (02:53 +0000)]
InstrProf: Add a test for PR22531
This is a test for the llvm change in r228793. We need to make sure
that names referred to by coverage end up in the right section, or the
coverage tools won't work.
llvm-svn: 228794
Justin Bogner [Wed, 11 Feb 2015 02:52:44 +0000 (02:52 +0000)]
InstrProf: Lower coverage mappings by setting their sections appropriately
Add handling for __llvm_coverage_mapping to the InstrProfiling
pass. We need to make sure the constant and any profile names it
refers to are in the correct sections, which is easier and cleaner to
do here where we have to know about profiling sections anyway.
This is really tricky to test without a frontend, so I'm committing
the test for the fix in clang. If anyone knows a good way to test this
within LLVM, please let me know.
Fixes PR22531.
llvm-svn: 228793
Richard Smith [Wed, 11 Feb 2015 02:41:33 +0000 (02:41 +0000)]
Add a warning for direct-list-initialization of a variable with a deduced type
(or of a lambda init-capture, which is sort-of such a variable). The semantics
of such constructs will change when we implement N3922, so we intend to warn on
this in Clang 3.6 then change the semantics in Clang 3.7.
llvm-svn: 228792