Duncan P. N. Exon Smith [Fri, 6 Feb 2015 22:55:13 +0000 (22:55 +0000)]
Support: Add dwarf::getLanguage()
llvm-svn: 228458
Duncan P. N. Exon Smith [Fri, 6 Feb 2015 22:53:19 +0000 (22:53 +0000)]
Support: Rewrite dwarf::LanguageString(), NFC
llvm-svn: 228457
Lang Hames [Fri, 6 Feb 2015 22:52:04 +0000 (22:52 +0000)]
[Orc] Add a Kaleidoscope tutorial for Orc demonstrating eager compilation.
This tutorial demonstrates a very basic custom Orc JIT stack that performs eager
compilation: All modules are CodeGen'd immediately upon being added to the JIT.
llvm-svn: 228456
Duncan P. N. Exon Smith [Fri, 6 Feb 2015 22:50:13 +0000 (22:50 +0000)]
IR: Allow 32-bits for lines in debug location
Remove unnecessary restriction of 24-bits for line numbers in
`MDLocation`.
The rest of the debug info schema (with the exception of local
variables) uses 32-bits for line numbers. As I introduce the
specialized nodes, it makes sense to canonicalize on one size or the
other.
llvm-svn: 228455
Lang Hames [Fri, 6 Feb 2015 22:48:43 +0000 (22:48 +0000)]
[Orc] Add more missing headers.
llvm-svn: 228454
Rui Ueyama [Fri, 6 Feb 2015 22:44:16 +0000 (22:44 +0000)]
Use make_unique.
llvm-svn: 228453
Sanjay Patel [Fri, 6 Feb 2015 22:43:52 +0000 (22:43 +0000)]
use local variables; NFC
llvm-svn: 228452
Duncan P. N. Exon Smith [Fri, 6 Feb 2015 22:34:48 +0000 (22:34 +0000)]
Support: Stop stringifying DW_LANG_{lo,hi}_user
llvm-svn: 228451
Rui Ueyama [Fri, 6 Feb 2015 22:34:29 +0000 (22:34 +0000)]
Remove unused #include.
llvm-svn: 228450
Rui Ueyama [Fri, 6 Feb 2015 22:32:09 +0000 (22:32 +0000)]
ELF: Split OrderPass::compareInitFini for readability. NFC.
llvm-svn: 228449
Duncan P. N. Exon Smith [Fri, 6 Feb 2015 22:29:35 +0000 (22:29 +0000)]
AsmParser: Use DW_TAG_hi_user instead of magic constant, NFC
llvm-svn: 228448
Duncan P. N. Exon Smith [Fri, 6 Feb 2015 22:28:05 +0000 (22:28 +0000)]
AsmWriter: Extract writeTag(), NFC
llvm-svn: 228447
Duncan P. N. Exon Smith [Fri, 6 Feb 2015 22:27:22 +0000 (22:27 +0000)]
AsmWriter: Extract writeMetadataAsOperand(), NFC
llvm-svn: 228446
Evgeniy Stepanov [Fri, 6 Feb 2015 21:47:39 +0000 (21:47 +0000)]
[msan] Fix "missing origin" in atomic store.
An atomic store always make the target location fully initialized (in the
current implementation). It should not store origin. Initialized memory can't
have meaningful origin, and, due to origin granularity (4 bytes) there is a
chance that this extra store would overwrite meaningfull origin for an adjacent
location.
llvm-svn: 228444
Johannes Doerfert [Fri, 6 Feb 2015 21:39:31 +0000 (21:39 +0000)]
[Refactor] Use only one BlockGenerator for a SCoP
This change has two main purposes:
1) We do not use a static interface to hide an object we create and
destroy for every basic block we copy.
2) We allow the BlockGenerator to store information between calls to
the copyBB method. This will ease scalar/phi code generation
later on.
While a lot of method signatures were changed this should not cause
any real behaviour change.
Differential Revision: http://reviews.llvm.org/D7467
llvm-svn: 228443
Cameron Esfahani [Fri, 6 Feb 2015 21:33:08 +0000 (21:33 +0000)]
Test commit to see if it triggers an email to llvm-commits. No change.
llvm-svn: 228442
Johannes Doerfert [Fri, 6 Feb 2015 21:26:45 +0000 (21:26 +0000)]
Do not run independent blocks when we model all scalar dependences
llvm-svn: 228441
Shankar Easwaran [Fri, 6 Feb 2015 21:23:50 +0000 (21:23 +0000)]
[Revert] [ELF] Determine default search directories from Context
It looks like the Driver manages search path for each Target lld would support
on the Gnu flavor.
llvm-svn: 228440
Johannes Doerfert [Fri, 6 Feb 2015 21:20:14 +0000 (21:20 +0000)]
[Fix] Broken test case
llvm-svn: 228439
Eric Christopher [Fri, 6 Feb 2015 20:53:40 +0000 (20:53 +0000)]
Make this test a little less specific by removing the argument that
could change.
llvm-svn: 228438
Zachary Turner [Fri, 6 Feb 2015 20:42:03 +0000 (20:42 +0000)]
Try to fix Makefile build for LLVMDebugInfoPDB.
llvm-svn: 228437
Saleem Abdulrasool [Fri, 6 Feb 2015 20:34:17 +0000 (20:34 +0000)]
Unwind: hoist placement delete into base class
Move the placement delete into the base class. This permits the proper emission
of the virtual destructor in UnwindCursor by using the class specific placement
delete instead of the normal single element ::operator delete. With this patch,
we can finally build libunwind as a DSO without a runtime dependency on
libc++/libc++abi.
llvm-svn: 228436
Zachary Turner [Fri, 6 Feb 2015 20:30:52 +0000 (20:30 +0000)]
Resubmit "Create lib/DebugInfo/PDB" (r228428)
This change resubmits the patch that broke the build, this time
without unittests. The unittests will be submitted separately
after the problem has been addressed:
--Original Commit Message--
Create lib/DebugInfo/PDB.
This patch creates a platform-independent interface to a PDB reader.
There is currently no implementation of this interface, which will
be provided in future patches. This defines the basic object model
which any implementation must conform to.
Reviewed by: David Blaikie
Differential Revision: http://reviews.llvm.org/D7356
llvm-svn: 228435
Michael Zolotukhin [Fri, 6 Feb 2015 20:20:40 +0000 (20:20 +0000)]
Use estimated number of optimized insns in unroll-threshold computation.
If complete-unroll could help us to optimize away N% of instructions, we
might want to do this even if the final size would exceed loop-unroll
threshold. However, we don't want to unroll huge loop, and we are add
AbsoluteThreshold to avoid that - this threshold will never be crossed,
even if we expect to optimize 99% instructions after that.
llvm-svn: 228434
Johannes Doerfert [Fri, 6 Feb 2015 20:13:15 +0000 (20:13 +0000)]
Model PHI nodes without demoting them
This allows us to model PHI nodes in the polyhedral description
without demoting them. The modeling however will result in the
same accesses as the demotion would have introduced.
Differential Revision: http://reviews.llvm.org/D7415
llvm-svn: 228433
Michael Zolotukhin [Fri, 6 Feb 2015 20:02:51 +0000 (20:02 +0000)]
[InstSimplify] Add SimplifyFPBinOp function.
It is a variation of SimplifyBinOp, but it takes into account
FastMathFlags.
It is needed in inliner and loop-unroller to accurately predict the
transformation's outcome (previously we dropped the flags and were too
conservative in some cases).
Example:
float foo(float *a, float b) {
float r;
if (a[1] * b)
r = /* a lot of expensive computations */;
else
r = 1;
return r;
}
float boo(float *a) {
return foo(a, 0.0);
}
Without this patch, we don't inline 'foo' into 'boo'.
llvm-svn: 228432
Zachary Turner [Fri, 6 Feb 2015 20:00:18 +0000 (20:00 +0000)]
Revert "Create lib/DebugInfo/PDB."
This reverts commit 21028, as it is causing failures in LLVMConfig.
llvm-svn: 228431
Oleksiy Vyalov [Fri, 6 Feb 2015 19:56:33 +0000 (19:56 +0000)]
Make lldb-platform to clear m_process_launch_info when hanlding qProcessInfo request - otherwise subsequent process launches will reuse data from previous launch.
llvm-svn: 228430
Kostya Serebryany [Fri, 6 Feb 2015 19:52:07 +0000 (19:52 +0000)]
[fuzzer] move default sanitizer options to a separate file
llvm-svn: 228429
Zachary Turner [Fri, 6 Feb 2015 19:44:09 +0000 (19:44 +0000)]
Create lib/DebugInfo/PDB.
This patch creates a platform-independent interface to a PDB reader.
There is currently no implementation of this interface, which will
be provided in future patches. This defines the basic object model
which any implementation must conform to.
Reviewed by: David Blaikie
Differential Revision: http://reviews.llvm.org/D7356
llvm-svn: 228428
Lang Hames [Fri, 6 Feb 2015 19:36:40 +0000 (19:36 +0000)]
[Orc] Move SectionMemoryManager's implementation from MCJIT to ExecutionEngine.
This is a more sensible home for SectionMemoryManager, and allows the implementation
to be shared between Orc and MCJIT.
llvm-svn: 228427
Lang Hames [Fri, 6 Feb 2015 19:34:40 +0000 (19:34 +0000)]
[Orc] Add some missing headers.
llvm-svn: 228426
Lang Hames [Fri, 6 Feb 2015 19:34:04 +0000 (19:34 +0000)]
[Orc] Fix syntax error in LazyEmittingLayer::removeModuleSet.
This was a trivial think-o, but it's in a method of a templated class
and doesn't have any callers yet, so the compiler let it pass. I hope
to add a unit test to cover this soon.
llvm-svn: 228425
Benjamin Kramer [Fri, 6 Feb 2015 18:58:04 +0000 (18:58 +0000)]
ASTUnit: Fix a name clash in GCC builds.
Should fix the build. Looks like GCC 4.9 is using different scoping rules for
range-based for loops.
llvm-svn: 228424
Saleem Abdulrasool [Fri, 6 Feb 2015 18:48:07 +0000 (18:48 +0000)]
Unwind: replace pure virtual functions with aborts
Convert all pure virtual functions in the UnwindCursor with implementations that
abort. This is effectively manually replicating the current behaviour, whilst
removing the compiler generated calls to __cxa_pure_virtual, which will abort at
runtime with a message indicating that a pure virtual call was made.
The whitespace changes are the result of executing clang-format over the changed
region.
llvm-svn: 228423
Eric Christopher [Fri, 6 Feb 2015 18:44:18 +0000 (18:44 +0000)]
Inline asm IR input register constraints don't have early clobber
modifiers on them. If we have a matching output constraint with
an early clobber make sure we don't propagate that to the input
constraint.
llvm-svn: 228422
Quentin Colombet [Fri, 6 Feb 2015 18:42:41 +0000 (18:42 +0000)]
[LiveIntervalAnalysis] Speed up creation of live ranges for physical registers
by using a segment set.
The patch addresses a compile-time performance regression in the LiveIntervals
analysis pass (see http://llvm.org/bugs/show_bug.cgi?id=18580). This regression
is especially critical when compiling long functions. Our analysis had shown
that the most of time is taken for generation of live intervals for physical
registers. Insertions in the middle of the array of live ranges cause quadratic
algorithmic complexity, which is apparently the main reason for the slow-down.
Overview of changes:
- The patch introduces an additional std::set<Segment>* member in LiveRange for
storing segments in the phase of initial creation. The set is used if this
member is not NULL, otherwise everything works the old way.
- The set of operations on LiveRange used during initial creation (i.e. used by
createDeadDefs and extendToUses) have been reimplemented to use the segment
set if it is available.
- After a live range is created the contents of the set are flushed to the
segment vector, because the set is not as efficient as the vector for the
later uses of the live range. After the flushing, the set is deleted and
cannot be used again.
- The set is only for live ranges computed in
LiveIntervalAnalysis::computeLiveInRegUnits() and getRegUnit() but not in
computeVirtRegs(), because I did not bring any performance benefits to
computeVirtRegs() and for some examples even brought a slow down.
Patch by Vaidas Gasiunas <vaidas.gasiunas@sap.com>
Differential Revision: http://reviews.llvm.org/D6013
llvm-svn: 228421
Benjamin Kramer [Fri, 6 Feb 2015 18:36:04 +0000 (18:36 +0000)]
ASTUnit: Use range-based for loops.
llvm-svn: 228420
Vince Harron [Fri, 6 Feb 2015 18:32:57 +0000 (18:32 +0000)]
Add support for SBProcess::PutSTDIN to remote processes
Processes running on a remote target can already send $O messages
to send stdout but there is no way to send stdin to a remote
inferior.
This allows processes using the API to pump stdin into a remote
inferior process.
It fixes a hang in TestProcessIO.py when running against a remote
target.
llvm-svn: 228419
Adam Nemet [Fri, 6 Feb 2015 18:31:04 +0000 (18:31 +0000)]
[LV] Move addRuntimeCheck to LoopAccessAnalysis
This will allow it to be shared with the new Loop Distribution pass.
getFirstInst is currently duplicated across LoopVectorize.cpp and
LoopAccessAnalysis.cpp. This is a short-term work-around until we figure out
a better solution.
NFC. (The code moved is adjusted a bit for the name of the Loop member and
that PtrRtCheck is now a reference rather than a pointer.)
llvm-svn: 228418
Ilia K [Fri, 6 Feb 2015 18:15:05 +0000 (18:15 +0000)]
Fix a missing "*stopped" notification in LLDB-MI after "process launch -s" in case of remote-macosx
Summary:
This patch fixes *stopped notification for remote target when started with eLaunchFlagStopAtEntry (for example, using "process launch -s").
See explanation below:
```
Target::Launch (ProcessLaunchInfo &launch_info, Stream *stream)
{
...
if (state != eStateConnected && platform_sp && platform_sp->CanDebugProcess ())
{
...
}
else
{
...
if (m_process_sp)
error = m_process_sp->Launch (launch_info);
}
if (error.Success())
{
if (launch_info.GetFlags().Test(eLaunchFlagStopAtEntry) == false)
{
....
}
-- missing event if eLaunchFlagStopAtEntry is set --
m_process_sp->RestoreProcessEvents ();
}
...
return error
```
Also this patch contains tests and you can check how it works.
Reviewers: zturner, clayborg, abidh
Reviewed By: clayborg
Subscribers: clayborg, abidh, zturner, lldb-commits
Differential Revision: http://reviews.llvm.org/D7273
llvm-svn: 228417
Ilia K [Fri, 6 Feb 2015 18:13:10 +0000 (18:13 +0000)]
Fix darwin-debug installation in cmake (OS X)
Summary: Fix darwin-debug installation in cmake (OS X)
Reviewers: zturner, clayborg
Subscribers: lldb-commits, zturner, clayborg
Differential Revision: http://reviews.llvm.org/D7470
llvm-svn: 228416
Ilia K [Fri, 6 Feb 2015 18:11:56 +0000 (18:11 +0000)]
Fix ConvenienceVariablesCase.test_with_dsym_and_run_command test after r227285
Summary:
This fixes test_with_dsym_and_run_command and test_with_dwarf_and_run_commands tests after r227285: "SBThread::GetDescription should use the Thread format instead of making up"
log:
```
======================================================================
FAIL: test_with_dsym_and_run_command (TestConvenienceVariables.ConvenienceVariablesCase)
Test convenience variables lldb.debugger, lldb.target, lldb.process, lldb.thread, and lldb.frame.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 456, in wrapper
return func(self, *args, **kwargs)
File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 612, in wrapper
func(*args, **kwargs)
File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py", line 18, in test_with_dsym_and_run_command
self.convenience_variables()
File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py", line 83, in convenience_variables
patterns = ['SBThread: tid = 0x[0-9a-f]+'])
File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 2091, in expect
msg if msg else EXP_MSG(str, exe))
AssertionError: False is not True : 'print lldb.thread
thread #1: tid = 0x80d885, 0x0000000100000f4d a.out`main(argc=1, argv=0x00007fff5fbff078) + 29 at main.c:4, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
' matches expected result
Config=x86_64-clang
======================================================================
FAIL: test_with_dwarf_and_run_commands (TestConvenienceVariables.ConvenienceVariablesCase)
Test convenience variables lldb.debugger, lldb.target, lldb.process, lldb.thread, and lldb.frame.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 473, in wrapper
return func(self, *args, **kwargs)
File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 641, in wrapper
func(*args, **kwargs)
File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 612, in wrapper
func(*args, **kwargs)
File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 537, in wrapper
func(*args, **kwargs)
File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 537, in wrapper
func(*args, **kwargs)
File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py", line 28, in test_with_dwarf_and_run_commands
self.convenience_variables()
File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py", line 83, in convenience_variables
patterns = ['SBThread: tid = 0x[0-9a-f]+'])
File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 2091, in expect
msg if msg else EXP_MSG(str, exe))
AssertionError: False is not True : 'print lldb.thread
thread #1: tid = 0x80d8d3, 0x0000000100000f4d a.out`main(argc=1, argv=0x00007fff5fbff078) + 29 at main.c:4, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
' matches expected result
Config=x86_64-clang
```
Reviewers: zturner, jingham, abidh, clayborg
Subscribers: abidh, lldb-commits, jingham, clayborg, zturner
Differential Revision: http://reviews.llvm.org/D7464
llvm-svn: 228415
Ilia K [Fri, 6 Feb 2015 18:10:30 +0000 (18:10 +0000)]
Fix evaluation commands (MI)
Summary:
These changes include:
* Fix -var-create to be able use current frame '*' (MI)
* Fix print-values option in -var-update (MI)
* Fix 'variable doesn't exist' error in -var-show-attributes (MI)
* Mark print-values option as 'handled-by-cmd' in -var-update (MI)
* Fix SBValue::GetValueDidChange if value was changed
* Fix lldb-mi: -data-evaluate-expression shows undef vars. Before this fix -data-evaluate-expression perceives undefined variables as strings:
```
(gdb)
-data-evaluate-expression undef
^done,value="undef"
```
* Minor fix: -data-evaluate-expression uses IsUnknownValue()
* Enable MiEvaluateTestCase test
All test pass on OS X.
Reviewers: abidh, clayborg
Subscribers: lldb-commits, clayborg, abidh
Differential Revision: http://reviews.llvm.org/D7463
llvm-svn: 228414
Steven Wu [Fri, 6 Feb 2015 18:08:29 +0000 (18:08 +0000)]
-iframework option should be forwarded to linker
Summary:
-iframework option is used to specified System framework path so the
path specified should be passed to linker as -F option
rdar://problem/
18234544
Reviewers: bob.wilson
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D7106
llvm-svn: 228413
Ilia K [Fri, 6 Feb 2015 18:08:24 +0000 (18:08 +0000)]
Fix -stack-list-locals and -stack-list-arguments (MI)
Summary:
These changes include:
* Add eVariableInfoFormat argument for MIResponseFormVariableInfo{,2,3} and GetVariableInfo{,2} functions
* Fix -stack-list-locals and -stack-list-arguments: they ingored print-values
* Enable MiStackTestCase tests for -stack-list-xxx commands
All test pass on OS X.
Reviewers: abidh, clayborg
Reviewed By: abidh
Subscribers: lldb-commits, clayborg, abidh
Differential Revision: http://reviews.llvm.org/D7462
llvm-svn: 228412
Reid Kleckner [Fri, 6 Feb 2015 17:59:49 +0000 (17:59 +0000)]
Don't dllexport declarations
Fixes PR22488
llvm-svn: 228411
Benjamin Kramer [Fri, 6 Feb 2015 17:51:54 +0000 (17:51 +0000)]
Make helper functions/classes/globals static. NFC.
llvm-svn: 228410
Matthias Braun [Fri, 6 Feb 2015 17:49:36 +0000 (17:49 +0000)]
InstCombine: Combine select sequences into a single select
Normalize
select(C0, select(C1, a, b), b) -> select((C0 & C1), a, b)
select(C0, a, select(C1, a, b)) -> select((C0 | C1), a, b)
This normal form may enable further combines on the And/Or and shortens
paths for the values. Many targets prefer the other but can go back
easily in CodeGen.
Differential Revision: http://reviews.llvm.org/D7399
llvm-svn: 228409
Saleem Abdulrasool [Fri, 6 Feb 2015 17:47:57 +0000 (17:47 +0000)]
unwind: use -fno-rtti -fno-exceptions -funwind-tables
RTTI and exceptions are not needed for the unwinder, the use of C++ there is for
very specific cases, and does not require dynamic_cast nor does it use
exceptions. This avoids unnecessary references to type information being
emitted.
llvm-svn: 228408
Ben Langmuir [Fri, 6 Feb 2015 17:34:28 +0000 (17:34 +0000)]
Make FileEntry::closeFile public
If you request that the file manager not close your file immediately
after reading, it's useful to be able to close it later to prevent a
file descriptor leak.
llvm-svn: 228407
Tom Stellard [Fri, 6 Feb 2015 17:30:04 +0000 (17:30 +0000)]
Revert "OpenCL: handle shift operator with vector operands"
This reverts commit r228382.
This breaks the following case: Reported by Jeroen Ketema:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-
20150202/122961.html
typedef __attribute__((ext_vector_type(3))) char char3;
void foo() {
char3 v = {1,1,1};
char3 w = {1,2,3};
w <<= v;
}
If I compile with:
clang -x cl file.c
Then an error is produced:
file.c:10:5: error: expression is not assignable
w <<= v;
~ ^
1 error generated.
llvm-svn: 228406
Matthias Braun [Fri, 6 Feb 2015 17:28:47 +0000 (17:28 +0000)]
LiveInterval: Fix SubRange memory leak.
llvm-svn: 228405
Benjamin Kramer [Fri, 6 Feb 2015 17:25:10 +0000 (17:25 +0000)]
Update APIs that return a pair of iterators to return an iterator_range instead.
Convert uses of those APIs into ranged for loops. NFC.
llvm-svn: 228404
Daniel Sanders [Fri, 6 Feb 2015 16:37:30 +0000 (16:37 +0000)]
[mips] Fix FileCheck prefixes with whitespace between 'CHECK' and ':'
llvm-svn: 228403
Bill Schmidt [Fri, 6 Feb 2015 15:31:03 +0000 (15:31 +0000)]
[PowerPC] Re-disable linker optimizations for now
llvm-svn: 228402
Shankar Easwaran [Fri, 6 Feb 2015 14:55:40 +0000 (14:55 +0000)]
Revert "[Core] Update ContentPermissions"
This reverts commit r228381.
The MachO writer uses the permissions as bit masks.
llvm-svn: 228401
Benjamin Kramer [Fri, 6 Feb 2015 14:44:02 +0000 (14:44 +0000)]
Value: Remove superfluous typedefs and deprecated method. NFC.
llvm-svn: 228400
Benjamin Kramer [Fri, 6 Feb 2015 14:43:55 +0000 (14:43 +0000)]
AArch64PromoteConstant: Modernize and resolve some Use<->User confusion.
NFC.
llvm-svn: 228399
Benjamin Kramer [Fri, 6 Feb 2015 14:43:49 +0000 (14:43 +0000)]
IRCE: Demote template to ArrayRef and SmallVector to array.
NFC.
llvm-svn: 228398
Chad Rosier [Fri, 6 Feb 2015 14:14:41 +0000 (14:14 +0000)]
Whitespace.
llvm-svn: 228397
Rafael Espindola [Fri, 6 Feb 2015 13:57:58 +0000 (13:57 +0000)]
Correcting keyword highlighting in llvm-mode.el.
llvm-mode was previously confused when variable names contained keywords.
This changes ensures that keywords are only highlighted when they're standalone.
Patch by Wilfred Hughes!
llvm-svn: 228396
Peter Zotov [Fri, 6 Feb 2015 13:42:03 +0000 (13:42 +0000)]
[OCaml] Add Llvm.build_empty_phi.
llvm-svn: 228395
Andrea Di Biagio [Fri, 6 Feb 2015 13:02:39 +0000 (13:02 +0000)]
Added a test to check that exception flags are not passed by default on PS4.
This patch adds an extra test case to clang-exception-flags.cpp.
No functional change intended.
Patch by Wolfgang Pieb!
Reviewers: filcab, alexr
Differential Revision: http://reviews.llvm.org/D7298
llvm-svn: 228394
Ilia K [Fri, 6 Feb 2015 12:43:05 +0000 (12:43 +0000)]
Fix -data-list-register-names/-data-disassemble, minor fix in -data-list-register-values (MI)
Summary:
* Fix -data-list-register-names command: previously it ignored regno arguments and always showed all registers
* Add 'size' field to -data-disassemble command: now we are able to get an instruction's size
* Minor fix in -data-list-register-value: fix comments/code style
* Enable all tests in MiDataTestCase
* Fix the GetRegister function that gets an register by its index
These changes were tested on OS X; all MiDataTestCase tests were passed.
Reviewers: clayborg, abidh
Reviewed By: clayborg, abidh
Subscribers: clayborg, abidh, lldb-commits
Differential Revision: http://reviews.llvm.org/D7442
llvm-svn: 228393
Kuba Brecka [Fri, 6 Feb 2015 12:07:29 +0000 (12:07 +0000)]
[compiler-rt] Make MaybeReexec properly process DYLD_INSERT_LIBRARIES when using non-absolute paths
MaybeReexec() in asan_mac.cc checks for presence of the ASan dylib in DYLD_INSERT_LIBRARIES, and if it is there, it will process this env. var. and remove the dylib from its value, so that spawned children don't have this variable set. However, the current implementation only works when using a canonical absolute path to the dylib, it fails to remove the dylib for example when using @executable_path.
This patch changes the processing of DYLD_INSERT_LIBRARIES to comparing values only based on filenames (ignoring directories).
Reviewed at http://reviews.llvm.org/D7160
llvm-svn: 228392
Pavel Labath [Fri, 6 Feb 2015 11:32:52 +0000 (11:32 +0000)]
Fix TestProcesslaunch regression caused by D7372
Summary:
After closing all the leaked file descriptors to the inferior tty, the following problem occured:
- when stdin, stdout and stderr are redirected, there are no slave descriptors open (which is good)
- lldb has a reader thread, which attempts to read from the master end of the tty
- this thread receives an EOF
- in response, it closes it's master end
- as this is the last open file descriptor for the master end, this deletes the tty and sends
SIGHUP to the inferior (this is bad)
I fix this problem by making sure the master end remains open for the duration of the inferior
process by storing a copy of the file descriptor in ProcessMonitor. I create a copy to avoid
ownership issues with the reading thread.
Reviewers: ovyalov, emaste
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D7440
llvm-svn: 228391
Arnaud A. de Grandmaison [Fri, 6 Feb 2015 11:28:16 +0000 (11:28 +0000)]
[PBQP] Fix comment wording. NFC
llvm-svn: 228390
Hafiz Abid Qadeer [Fri, 6 Feb 2015 11:06:41 +0000 (11:06 +0000)]
Give error on "-inferior-tty-set" command.
This command is not implemented yet. Giving error gives chance to clients to
handle it properly instead of falsely assuming the lldb-mi is supporting it.
llvm-svn: 228389
Tamas Berghammer [Fri, 6 Feb 2015 10:57:40 +0000 (10:57 +0000)]
Fix build of lldb-gdbserver and lldb-platform for android (arm32, x86)
* Fix cmake script for android x86
* Reorder includes to avoid collision between system macros and local
variables in clang framework
Differential Revision: http://reviews.llvm.org/D7435
llvm-svn: 228388
Tamas Berghammer [Fri, 6 Feb 2015 10:42:33 +0000 (10:42 +0000)]
Fix TestThreadSpecificBreakpoint with LLGS
* Set the state of the process into running/stepping on continue/step operations
* Add mutex to use transactions in Thread State Coordinator
** It is required because the events from two Signal Handler or form a Signal handler and a Resume request shouldn't overlap
* Send Stop Replay Packet only when the state of the process changed
Differential Revision: http://reviews.llvm.org/D7374
llvm-svn: 228387
Bruce Mitchener [Fri, 6 Feb 2015 06:46:52 +0000 (06:46 +0000)]
Add additional DWARF 5 language constants.
This also hooks up the new C++14 language constant to be treated
the same as the other C++ language constants.
Differential Revision: http://reviews.llvm.org/D7429
llvm-svn: 228386
Craig Topper [Fri, 6 Feb 2015 06:19:28 +0000 (06:19 +0000)]
[X86] Add assembler and disassembler test cases for clflushopt, clwb, pcommit, xsaves, xrstors, xsavec
llvm-svn: 228385
Yury Gribov [Fri, 6 Feb 2015 05:53:08 +0000 (05:53 +0000)]
[UBSan] Enable -Wglobal-constructors.
llvm-svn: 228384
Craig Topper [Fri, 6 Feb 2015 05:50:50 +0000 (05:50 +0000)]
[X86] Remove a ton of duplicate test cases for the assembler.
llvm-svn: 228383
Sameer Sahasrabuddhe [Fri, 6 Feb 2015 05:44:55 +0000 (05:44 +0000)]
OpenCL: handle shift operator with vector operands
Introduce a number of checks:
1. If LHS is a scalar, then RHS cannot be a vector.
2. Operands must be of integer type.
3. If both are vectors, then the number of elements must match.
Relax the requirement for "usual arithmetic conversions":
When LHS is a vector, a scalar RHS can simply be expanded into a
vector; OpenCL does not require that its rank be lower than the LHS.
For example, the following code is not an error even if the implicit
type of the constant literal is "int".
char2 foo(char2 v) { return v << 1; }
Consolidate existing tests under CodeGenOpenCL, and add more tests
under SemaOpenCL.
llvm-svn: 228382
Shankar Easwaran [Fri, 6 Feb 2015 05:29:49 +0000 (05:29 +0000)]
[Core] Update ContentPermissions
The values are already arranged in ascending order, and all tests still pass.
Removing the values as its confusing when new enumerations need to be added.
llvm-svn: 228381
Shankar Easwaran [Fri, 6 Feb 2015 05:29:48 +0000 (05:29 +0000)]
[ELF][TODO] Update TODO.
llvm-svn: 228380
Shankar Easwaran [Fri, 6 Feb 2015 05:01:38 +0000 (05:01 +0000)]
[Cleanup] Remove member functions added to support nostdlib
No change in functionality.
llvm-svn: 228379
Shankar Easwaran [Fri, 6 Feb 2015 04:50:22 +0000 (04:50 +0000)]
[ELF] Remove stray semicolon
llvm-svn: 228378
Shankar Easwaran [Fri, 6 Feb 2015 04:15:04 +0000 (04:15 +0000)]
[ELF] Speedup creating program headers.
After the total number of program headers are determined, virtual addresses
and file offsets need not be reassigned for sections whose virtual addresses and
fileoffsets remained the same.
This doesnot change any functionality.
llvm-svn: 228377
Shankar Easwaran [Fri, 6 Feb 2015 04:15:02 +0000 (04:15 +0000)]
[Core] Remove roundTripPass() function.
Use the environment variable "LLD_RUN_ROUNDTRIP_TEST" in the test that you want
to disable, as
RUN: env LLD_RUN_ROUNDTRIP_TEST= <run>
This was a patch that I made, but I find this a better way to accomplish what we
want to do.
llvm-svn: 228376
Shankar Easwaran [Fri, 6 Feb 2015 04:15:00 +0000 (04:15 +0000)]
[ELF] Fix -nostdlib option.
Only search library directories explicitly specified
on the command line. Library directories specified in linker
scripts (including linker scripts specified on the command
line) are ignored.
llvm-svn: 228375
Michel Danzer [Fri, 6 Feb 2015 02:51:29 +0000 (02:51 +0000)]
R600/SI: Amend a test to ensure WQM is enabled for LDS in pixel shaders
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 228374
Michel Danzer [Fri, 6 Feb 2015 02:51:25 +0000 (02:51 +0000)]
R600/SI: Don't enable WQM for V_INTERP_* instructions v2
Doesn't seem necessary anymore. I think this was mostly compensating for
not enabling WQM for texture sampling instructions.
v2: Add test coverage
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 228373
Michel Danzer [Fri, 6 Feb 2015 02:51:20 +0000 (02:51 +0000)]
R600/SI: Also enable WQM for image opcodes which calculate LOD v3
If whole quad mode isn't enabled for these, the level of detail is
calculated incorrectly for pixels along diagonal triangle edges, causing
artifacts.
v2: Use a TSFlag instead of lots of switch cases
v3: Add test coverage
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88642
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 228372
Richard Smith [Fri, 6 Feb 2015 02:42:59 +0000 (02:42 +0000)]
[modules] If a module declares an entity and then imports another declaration
of that entity, ensure that the redeclaration chain is reordered properly on
reload. Otherwise, the result of name lookup for that entity may point to an
entity that is too old; if that's an injected friend name or the like, that
can result in the name not being found at all.
llvm-svn: 228371
Jim Ingham [Fri, 6 Feb 2015 02:10:56 +0000 (02:10 +0000)]
Add a "-a/--address" option to "thread until". You can specify one or more line numbers (as arguments)
and/or one or more addresses (with -a) and until will stop at the first one of thesepoints it hits,
or on exit from the function if you leave the function before hitting any of these stop points.
<rdar://problem/
12438270>
llvm-svn: 228370
Ramkumar Ramachandra [Fri, 6 Feb 2015 01:46:42 +0000 (01:46 +0000)]
Introduce print-memderefs to test isDereferenceablePointer
Since testing the function indirectly is tricky, introduce a direct
print-memderefs pass, in the same spirit as print-memdeps, which prints
dereferenceability information matched by FileCheck.
Differential Revision: http://reviews.llvm.org/D7075
llvm-svn: 228369
Matthias Braun [Fri, 6 Feb 2015 01:25:08 +0000 (01:25 +0000)]
Fix build for apple machines.
HAVE_CRASHREPORTERCLIENT_H was potentially undefined and -Wundef is
enabled now.
llvm-svn: 228368
Tim Northover [Fri, 6 Feb 2015 01:25:07 +0000 (01:25 +0000)]
Preprocessor: support __BIGGEST_ALIGNMENT__ macro
For compatibility with GCC (and because it's generally helpful information
otherwise inaccessible to the preprocessor). This appears to be canonically the
alignment of max_align_t (e.g. on i386, __BIGGEST_ALIGNMENT__ is 4 even though
vector types will be given greater alignment).
Patch mostly by Mats Petersson
llvm-svn: 228367
Dan Albert [Fri, 6 Feb 2015 00:08:40 +0000 (00:08 +0000)]
Fix build.
Had a bad rebase that merged the #if in two places. Whoops.
llvm-svn: 228366
Saleem Abdulrasool [Thu, 5 Feb 2015 23:59:11 +0000 (23:59 +0000)]
Revert "indicate tag type in C"
This reverts commit
4963ea3107a2fdfae21f7806896905f20b21ff0d.
This change was wrong. The parameter type is sugared via a typedef. The errors
generated may have been due to a different root cause, and should be fixed
through the recent series of changes.
llvm-svn: 228365
Dan Albert [Thu, 5 Feb 2015 23:56:33 +0000 (23:56 +0000)]
Add __cxxabi_config.h to libcxxabi headers.
llvm-svn: 228364
Dan Albert [Thu, 5 Feb 2015 23:55:15 +0000 (23:55 +0000)]
[libcxxabi] Fix -Werror build for 32-bit non-ARM.
Summary:
The inclusion of Unwind-EHABI.h was insufficiently guarded
(LIBCXXABI_ARM_EHABI was beign checked without ever being defined).
Move the check into the header file itself, add the check to the
source file, and clean up the existing checks.
LIBCXXABI_ARM_EHABI didn't have a canonical defintion; it was
duplicated across cxxabi.h, libunwind.h, and unwind.h. Move the
definition into __cxxabi_config.h and clean up the old cruft (note: we
will have to ship this header).
There are also a few drive-by formatting/whitespace cleanups.
Reviewers: jroelofs, thakis, compnerd
Reviewed By: compnerd
Subscribers: compnerd, aemerson, cfe-commits
Differential Revision: http://reviews.llvm.org/D7419
llvm-svn: 228363
Matthias Braun [Thu, 5 Feb 2015 23:52:14 +0000 (23:52 +0000)]
AArch64: Make test more robust.
Avoid the creation of select instructions which can result in different
scheduling of the selects.
I also added a bunch of additional store volatiles. Those avoid A
CodeGen problem (bug?) where normalizes and denomarlizing the control
moves all shift instructions into the first block where ISel can't match
them together with the cmps.
llvm-svn: 228362
Matthias Braun [Thu, 5 Feb 2015 23:52:12 +0000 (23:52 +0000)]
X86: Test cleanup
Use FileCheck, make it more consistent and do not rely on unoptimized
or(cmp,cmp) getting combined for max to be matched.
llvm-svn: 228361
Dan Albert [Thu, 5 Feb 2015 23:48:06 +0000 (23:48 +0000)]
Formatting fixes.
We should clang-format the whole thing when we finally move the
unwinder to its new home.
llvm-svn: 228360
Saleem Abdulrasool [Thu, 5 Feb 2015 23:27:41 +0000 (23:27 +0000)]
Fix compilation of unwind on Darwin-x86_64
EHABI related typedef sugar is gated via LIBCXXABI_ARM_EHABI which did not
protect the EHABI header. This would cause declarations to be emitted on
non-EHABI targets, resulting in errors. This permits compilation on Darwin.
llvm-svn: 228359
Saleem Abdulrasool [Thu, 5 Feb 2015 23:27:39 +0000 (23:27 +0000)]
Silence some -Wundef warnings
config.h:53:7: warning 'FOR_DYLD' is not defined, evaluates to 0 [-Wundef]
Unwind_AppleExtras.cpp:44:5: warning '__arm__' is not defined, evaluates to 0 [-Wundef]
Unwind_AppleExtras.cpp:60:7: warning '__arm64__' is not defined, evaluates to 0 [-Wundef]
Unwind_AppleExtras.cpp:186:6: warning 'FOR_DYLD' is not defined, evaluates to 0 [-Wundef]
Use defined(macro) which should be equivalent in these cases, silencing -Wundef
warnings. NFC.
llvm-svn: 228358