Todd Fiala [Wed, 6 Apr 2016 01:14:37 +0000 (01:14 +0000)]
make TestRegisterVariables slightly more resilient
This test sets the compiler optimization level to -O1 and
makes some assumptions about how local frame vars will be
stored (i.e. in registers). These assumptions are not always
true.
I did a first-pass set of improvements that:
(1) no longer assumes that every one of the target locations has
every variable in a register. Sometimes the compiler
is even smarter and skips the register entirely.
(2) simply expects one of the 5 or so variables it checks
to be in a register.
This test probably passes on a whole lot more systems than it
used to now. This is certainly true on OS X.
llvm-svn: 265498
Ivan Krasin [Wed, 6 Apr 2016 01:11:10 +0000 (01:11 +0000)]
Fix a memory leak found by check-lld asan tests.
Summary:
This bug was introduced by http://reviews.llvm.org/rL265059,
where InputSectionBase got Thunks field, which can do memory allocations.
Since InputSectionBase destructors were never called (I count it as another bug),
that caused a memory leak when 2 or more thunks are added to a section.
The fix to is properly call InputSectionBase destructors from ~ObjectFile.
Reviewers: atanasyan, ruiu, rafael
Subscribers: rafael, krasin, pcc
Differential Revision: http://reviews.llvm.org/D18809
llvm-svn: 265497
Jim Ingham [Wed, 6 Apr 2016 00:25:44 +0000 (00:25 +0000)]
The FixItList typedef should have been inside "class ClangDiagnostic".
llvm-svn: 265496
Jim Ingham [Wed, 6 Apr 2016 00:25:04 +0000 (00:25 +0000)]
If the fixed expression doesn't parse, don't tell the user about it.
llvm-svn: 265495
Jim Ingham [Wed, 6 Apr 2016 00:24:17 +0000 (00:24 +0000)]
Don't write "using $_lldb_local_vars" statements for variables with
no name. These were showing up with a recent clang, I haven't tracked
down why yet, but adding them is clearly wrong.
llvm-svn: 265494
David Majnemer [Wed, 6 Apr 2016 00:14:59 +0000 (00:14 +0000)]
[SLPVectorizer] Vectorize libcalls of sqrt
We didn't realize that we could transform the libcall into a vectorized
intrinsic.
llvm-svn: 265493
Quentin Colombet [Tue, 5 Apr 2016 23:57:25 +0000 (23:57 +0000)]
[RegisterBankInfo] Include RegisterBank.h.
We actually need the definition of a RegisterBank to be able to inline
the implementation of the subscript operator.
llvm-svn: 265492
Quentin Colombet [Tue, 5 Apr 2016 23:43:58 +0000 (23:43 +0000)]
[RegisterBankInfo] Add missing include for assert.
This should appease the linux bot.
llvm-svn: 265491
Davide Italiano [Tue, 5 Apr 2016 23:37:08 +0000 (23:37 +0000)]
[DebugInfo] Fix tests so that each subprogram belongs to a CU.
llvm-svn: 265490
Quentin Colombet [Tue, 5 Apr 2016 23:34:59 +0000 (23:34 +0000)]
[AArch64] Initial implementation of the targeting of the register bank information.
llvm-svn: 265489
Manman Ren [Tue, 5 Apr 2016 23:27:51 +0000 (23:27 +0000)]
Update testing cases after backend changes.
llvm-svn: 265488
Quentin Colombet [Tue, 5 Apr 2016 23:26:39 +0000 (23:26 +0000)]
[RegisterBankInfo] Simplify the API for build a register bank.
As part of the TRI argument of addRegBankCoverage we already have access to
the TargetRegisterClass through the ID of that register class.
Therefore, there is no point in needing a TargetRegisterClass instance,
the ID is enough to get to it.
llvm-svn: 265487
Sanjoy Das [Tue, 5 Apr 2016 23:18:53 +0000 (23:18 +0000)]
[RS4GC] NFC cleanup of the DeferredReplacement class
Instead of constructors use clearly named factory methods.
llvm-svn: 265486
Sanjoy Das [Tue, 5 Apr 2016 23:18:35 +0000 (23:18 +0000)]
[RS4GC] Better codegen for deoptimize calls
Don't emit a gc.result for a statepoint lowered from
@llvm.experimental.deoptimize since the call into __llvm_deoptimize is
effectively noreturn. Instead follow the corresponding gc.statepoint
with an "unreachable".
llvm-svn: 265485
Quentin Colombet [Tue, 5 Apr 2016 23:04:54 +0000 (23:04 +0000)]
[Target] Remove a deprecated comment.
llvm-svn: 265484
Quentin Colombet [Tue, 5 Apr 2016 22:50:40 +0000 (22:50 +0000)]
[Target] Add an accessor to the register bank information.
llvm-svn: 265483
Manman Ren [Tue, 5 Apr 2016 22:44:44 +0000 (22:44 +0000)]
Swift Calling Convention: swiftcc for ARM.
Differential Revision: http://reviews.llvm.org/D18769
llvm-svn: 265482
Evgeniy Stepanov [Tue, 5 Apr 2016 22:41:50 +0000 (22:41 +0000)]
Faster stack-protector for Android/AArch64.
Bionic has a defined thread-local location for the stack protector
cookie. Emit a direct load instead of going through __stack_chk_guard.
llvm-svn: 265481
Manman Ren [Tue, 5 Apr 2016 22:41:47 +0000 (22:41 +0000)]
Swift Calling Convention: add swiftcc.
Differential Revision: http://reviews.llvm.org/D17863
llvm-svn: 265480
Quentin Colombet [Tue, 5 Apr 2016 22:34:01 +0000 (22:34 +0000)]
[RegisterBank] Implement the verify method to check for the obvious mistakes.
llvm-svn: 265479
Rafael Espindola [Tue, 5 Apr 2016 22:08:39 +0000 (22:08 +0000)]
Delete broken code.
A synthetic symbol can be global or local, and with the current
infrastructure we don't need any special code for it.
Fixes PR27228.
llvm-svn: 265478
Lang Hames [Tue, 5 Apr 2016 22:06:48 +0000 (22:06 +0000)]
[lld][MachO] Check Expected<T> for error prior to destruction.
This should fix the failures on the LLD bots caused by r265446.
llvm-svn: 265477
Adrian McCarthy [Tue, 5 Apr 2016 21:49:41 +0000 (21:49 +0000)]
Revert "XFail TestImport.py on Windows because Python 3 import rules don't work that way."
This reverts commit
e5f0ba4fcf977ad6baaaca700d3646675cdac19b.
llvm-svn: 265476
Quentin Colombet [Tue, 5 Apr 2016 21:47:56 +0000 (21:47 +0000)]
[RegisterBankInfo] Add debug print to check how the initialization is going.
llvm-svn: 265475
George Burgess IV [Tue, 5 Apr 2016 21:40:45 +0000 (21:40 +0000)]
[CFLAA] Fix PR27213; incorrect tagging of args/globals
Prior to this patch, CFLAA wouldn't tag arguments/globals properly if
it didn't find any "interesting" edges on them. This means that, if all
you do is store constants to a global or argument, we would never
actually treat it as a global/argument.
Test case:
define void @foo(i32* %A, i32* %B) #0 {
entry:
store i32 0, i32* %A, align 4
store i32 0, i32* %B, align 4
ret void
}
CFLAA would say that %A can't alias %B, because neither pointer was
used in an interesting way. This patch makes us note whether something
is an argument, global, ... regardless of how interesting CFLAA thinks
its uses are.
(For the record, using a value in an interesting way means loading
from it, using it in a GEP, ...)
llvm-svn: 265474
Quentin Colombet [Tue, 5 Apr 2016 21:40:43 +0000 (21:40 +0000)]
[RegisterBank] Add printable capabilities for future debugging.
llvm-svn: 265473
Rafael Espindola [Tue, 5 Apr 2016 21:27:30 +0000 (21:27 +0000)]
Add a test for relocations in non alloc sections.
We already got this right, but we were not testing it.
llvm-svn: 265471
Duncan P. N. Exon Smith [Tue, 5 Apr 2016 21:25:33 +0000 (21:25 +0000)]
Try harder to appease MSVC after r265456
r265465 wasn't good enough. I need to spell out all the moves.
llvm-svn: 265470
Quentin Colombet [Tue, 5 Apr 2016 21:20:12 +0000 (21:20 +0000)]
[RegisterBankInfo] Make addRegBankCoverage more capable to ease
targeting jobs.
Now, addRegBankCoverage also adds the subreg-classes not just the
sub-classes of the given register class.
llvm-svn: 265469
Junmo Park [Tue, 5 Apr 2016 21:14:31 +0000 (21:14 +0000)]
Minor code cleanups. NFC.
llvm-svn: 265468
Richard Trieu [Tue, 5 Apr 2016 21:13:54 +0000 (21:13 +0000)]
Fix a crash on invalid with template handling
This is a fix for https://llvm.org/bugs/show_bug.cgi?id=25561 which was a
crash on invalid. Change the handling of invalid decls to have a catch-all
case to prevent unexpecting decls from triggering an assertion.
llvm-svn: 265467
Duncan P. N. Exon Smith [Tue, 5 Apr 2016 21:10:45 +0000 (21:10 +0000)]
IR: Introduce ConstantAggregate, NFC
Add a common parent class for ConstantArray, ConstantVector, and
ConstantStruct called ConstantAggregate. These are the aggregate
subclasses of Constant that take operands.
This is mainly a cleanup, adding common `isa` target and removing
duplicated code. However, it also simplifies caching which constants
point transitively at `GlobalValue` (a possible future direction).
llvm-svn: 265466
Duncan P. N. Exon Smith [Tue, 5 Apr 2016 21:07:01 +0000 (21:07 +0000)]
Try to appease MSVC after r265456
I can't remember if adding `= default` will make MSVC happy, or if I
have to spell this out. Let's try the cleaner version first.
llvm-svn: 265465
Quentin Colombet [Tue, 5 Apr 2016 21:06:15 +0000 (21:06 +0000)]
[RegisterBankInfo] Implement the methods to create register banks.
llvm-svn: 265464
Duncan P. N. Exon Smith [Tue, 5 Apr 2016 20:53:47 +0000 (20:53 +0000)]
IR: Add missing assertion for ConstantVector::ConstantVector
Use the same assertion as ConstantArray. Vectors should have the right
number of elements.
llvm-svn: 265463
Ed Schouten [Tue, 5 Apr 2016 20:51:50 +0000 (20:51 +0000)]
Make TLS work for PIE executables on x86-64.
While trying to get PIE work on CloudABI for x86-64, I noticed that even
though GNU ld would generate functional binaries, LLD would not. It
turns out that we generate relocations for referencing TLS objects
inside of the text segment, which shouldn't happen.
This change extends the isRelRelative() function to list some additional
relocation types that should be treated as relative. This makes my C
library unit testing binary work on x86-64.
Approved by: ruiu
Differential Revision: http://reviews.llvm.org/D18688
Fixes bug: https://llvm.org/bugs/show_bug.cgi?id=27174
llvm-svn: 265462
Adrian McCarthy [Tue, 5 Apr 2016 20:49:09 +0000 (20:49 +0000)]
XFail TestImport.py on Windows because Python 3 import rules don't work that way.
llvm-svn: 265461
Quentin Colombet [Tue, 5 Apr 2016 20:48:32 +0000 (20:48 +0000)]
[RegisterBank] Provide a way to check if a register bank is valid.
Change the default constructor to create invalid object.
The target will have to properly initialize the register banks before
using them.
llvm-svn: 265460
Duncan P. N. Exon Smith [Tue, 5 Apr 2016 20:45:04 +0000 (20:45 +0000)]
Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes."
This reverts commit r265454 since it broke the build. E.g.:
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/22413/
llvm-svn: 265459
Duncan P. N. Exon Smith [Tue, 5 Apr 2016 20:31:23 +0000 (20:31 +0000)]
Make constructors for final subclasses of Constant private, NFC
These were `protected` before, but might as well be `private`. Also
marked the classes themselves `final`.
llvm-svn: 265458
David Blaikie [Tue, 5 Apr 2016 20:26:50 +0000 (20:26 +0000)]
llvm-dwp: Handle GCC's use of multiple debug_types.dwo sections in a single .dwo file
(also includes the .test file missing from my previous commit, r265452)
llvm-svn: 265457
Duncan P. N. Exon Smith [Tue, 5 Apr 2016 20:23:21 +0000 (20:23 +0000)]
ValueMapper: Rewrite Mapper::mapMetadata without recursion
This commit completely rewrites Mapper::mapMetadata (the implementation
of llvm::MapMetadata) using an iterative algorithm. The guts of the new
algorithm are in MDNodeMapper::map, the entry function in a new class.
Previously, Mapper::mapMetadata performed a recursive exploration of the
graph with eager "just in case there's a reason" malloc traffic.
The new algorithm has these benefits:
- New nodes and temporaries are not created eagerly.
- Uniquing cycles are not duplicated (see new unit test).
- No recursion.
Given a node to map, it does this:
1. Use a worklist to perform a post-order traversal of the transitively
referenced unmapped nodes.
2. Track which nodes will change operands, and which will have new
addresses in the mapped scheme. Propagate the changes through the
POT until fixed point, to pick up uniquing cycles that need to
change.
3. Map all the distinct nodes without touching their operands. If
RF_MoveDistinctMetadata, they get mapped to themselves; otherwise,
they get mapped to clones.
4. Map the uniqued nodes (bottom-up), lazily creating temporaries for
forward references as needed.
5. Remap the operands of the distinct nodes.
Mehdi helped me out by profiling this with -flto=thin. On his workload
(importing/etc. for opt.cpp), MapMetadata sped up by 15%, contributed
about 50% less to persistent memory, and made about 100x fewer calls to
malloc. The speedup is less than I'd hoped. The profile mainly blames
DenseMap lookups; perhaps there's a way to reduce them (e.g., by
disallowing remapping of MDString).
It would be nice to break the strange remaining recursion on the Value
side: MapValue => materializeInitFor => RemapInstruction => MapValue. I
think we could do this by having materializeInitFor return a worklist of
things to be remapped.
llvm-svn: 265456
Quentin Colombet [Tue, 5 Apr 2016 20:21:53 +0000 (20:21 +0000)]
[TargetRegisterClass] Improve the comment for how to use getSubClassMask.
llvm-svn: 265455
Eugene Zelenko [Tue, 5 Apr 2016 20:19:49 +0000 (20:19 +0000)]
Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes.
Some Include What You Use suggestions were used too.
Use anonymous namespaces in source files.
Differential revision: http://reviews.llvm.org/D18778
llvm-svn: 265454
Ed Schouten [Tue, 5 Apr 2016 20:17:33 +0000 (20:17 +0000)]
Don't omit dynamic relocations for the GOT.
Where Clang's AArch64 backend seems to differ from the X86 backend is
that it tends to use the GOT more aggressively.
After getting CloudABI PIEs working on x86-64, I noticed that accessing
global variables would still crash on aarch64. Tracing it down, it turns
out that the GOT was filled with entries assuming the base address was
zero.
It turns out that we skip generating relocations for GOT entries in case
the relocation pointing towards the GOT is relative. Whether the thing
pointing to the GOT is absolute or relative shouldn't make any
difference; the GOT entry itself should contain the absolute address,
thus needs a relocation regardless.
Approved by: rafael
Differential Revision: http://reviews.llvm.org/D18739
llvm-svn: 265453
David Blaikie [Tue, 5 Apr 2016 20:16:38 +0000 (20:16 +0000)]
llvm-dwp: Handle dwo files produced by GCC
To start with, handle DW_FORM_string names. Follow up commit will handle
the interesting quirk with type units I was originally aiming for here.
llvm-svn: 265452
Lang Hames [Tue, 5 Apr 2016 20:11:24 +0000 (20:11 +0000)]
[llvm-rtdyld] Fix the return type on ErrorAndExit.
As suggested by Rafael - this function no longer returns a value as of r264425.
llvm-svn: 265451
Ahmed Bougacha [Tue, 5 Apr 2016 20:02:57 +0000 (20:02 +0000)]
[X86] Reuse EFLAGS and form LOCKed ops when only user is SETCC.
We only generate LOCKed versions of add/sub when the result is unused.
It often happens that the result is used, but only by a comparison. We
can optimize those out by reusing EFLAGS, which lets us use the proper
instructions, instead of having to fallback to LXADD.
Instead of doing this as an MI peephole (as we do for the other
non-LOCKed (really, non-MR) forms), do it in ISel. It becomes quite
tricky later.
This also makes it eventually possible to stop expanding and/or/xor
if the only user is an icmp (also see D18141).
This uses the LOCK ISD opcodes added by r262244.
Differential Revision: http://reviews.llvm.org/D17633
llvm-svn: 265450
Quentin Colombet [Tue, 5 Apr 2016 20:02:47 +0000 (20:02 +0000)]
[GlobalISel] Add the RegisterBankInfo class for the handling of register banks.
llvm-svn: 265449
Ahmed Bougacha [Tue, 5 Apr 2016 20:02:44 +0000 (20:02 +0000)]
[X86] Add tests for ATOMIC_LOAD_OP EFLAGS reuse. NFC.
llvm-svn: 265448
Ahmed Bougacha [Tue, 5 Apr 2016 20:02:22 +0000 (20:02 +0000)]
[X86] Simplify early-exit check. NFC.
llvm-svn: 265447
Lang Hames [Tue, 5 Apr 2016 19:57:03 +0000 (19:57 +0000)]
[Support] Add a checked flag to Expected<T>, require checks before access or
destruction.
This makes the Expected<T> class behave like Error, even when in success mode.
Expected<T> values must be checked to see whether they contain an error prior
to being dereferenced, assigned to, or destructed.
llvm-svn: 265446
Quentin Colombet [Tue, 5 Apr 2016 19:54:44 +0000 (19:54 +0000)]
[GlobalISel] Add a class, RegisterBank, to represent register banks.
llvm-svn: 265445
Sanjay Patel [Tue, 5 Apr 2016 19:50:21 +0000 (19:50 +0000)]
fixed to discard earlier advertising
Also, hardcode (there must be a better way...) the 'utils' dir in the
advertisement, so it's easier to find.
llvm-svn: 265444
Greg Clayton [Tue, 5 Apr 2016 19:29:05 +0000 (19:29 +0000)]
Fix a crasher that could happen if ClangASTSource::CompleteType() found a type whose name matched, but came from a different language. We need to verify that any types we find are clang types before trying to extra a clang::QualType and then use it.
<rdar://problem/
24138711>
llvm-svn: 265443
Sanjay Patel [Tue, 5 Apr 2016 19:27:39 +0000 (19:27 +0000)]
fix typo; NFC
llvm-svn: 265442
Quentin Colombet [Tue, 5 Apr 2016 19:26:42 +0000 (19:26 +0000)]
[AArch64][Test] Do not override the suffixes for test cases.
llvm-svn: 265441
Quentin Colombet [Tue, 5 Apr 2016 19:06:01 +0000 (19:06 +0000)]
[GlobalISel] Add the skeleton of the RegBankSelect pass.
This pass is reponsible for assigning the generic virtual registers to register
banks.
llvm-svn: 265440
Nirav Dave [Tue, 5 Apr 2016 18:59:37 +0000 (18:59 +0000)]
Fix broken tests from no-jump-table commit
Summary: Fix failing tests from no-jump-table flag addition
Reviewers: jyknight
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D18801
llvm-svn: 265439
Lang Hames [Tue, 5 Apr 2016 18:50:09 +0000 (18:50 +0000)]
[Support] clang-format Error.h.
This tidies up the ExitOnError class and some other recently added code. NFC.
llvm-svn: 265438
Jonathan Peyton [Tue, 5 Apr 2016 18:48:48 +0000 (18:48 +0000)]
[STATS] Remove trailing whitespace in stats source files
llvm-svn: 265437
Justin Lebar [Tue, 5 Apr 2016 18:26:25 +0000 (18:26 +0000)]
[CUDA] Show --cuda-gpu-arch option in clang --help.
For some reason it was hidden.
llvm-svn: 265436
Justin Lebar [Tue, 5 Apr 2016 18:26:20 +0000 (18:26 +0000)]
[CUDA] Add -fcuda-flush-denormals-to-zero.
Summary:
Setting this flag causes all functions are annotated with the
"nvvm-f32ftz" = "true" attribute.
In addition, we annotate the module with "nvvm-reflect-ftz" set
to 0 or 1, depending on whether -cuda-flush-denormals-to-zero is set.
This is read by the NVVMReflect pass.
Reviewers: tra, rnk
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D18671
llvm-svn: 265435
Sanjay Patel [Tue, 5 Apr 2016 18:23:30 +0000 (18:23 +0000)]
fix documentation comments; NFC
llvm-svn: 265434
Manman Ren [Tue, 5 Apr 2016 18:13:16 +0000 (18:13 +0000)]
Swift Calling Convention: swifterror target-independent change.
At IR level, the swifterror argument is an input argument with type
ErrorObject**. For targets that support swifterror, we want to optimize it
to behave as an inout value with type ErrorObject*; it will be passed in a
fixed physical register.
The main idea is to track the virtual registers for each swifterror value. We
define swifterror values as AllocaInsts with swifterror attribute or a function
argument with swifterror attribute.
In SelectionDAGISel.cpp, we set up swifterror values (SwiftErrorVals) before
handling the basic blocks.
When iterating over all basic blocks in RPO, before actually visiting the basic
block, we call mergeIncomingSwiftErrors to merge incoming swifterror values when
there are multiple predecessors or to simply propagate them. There, we create a
virtual register for each swifterror value in the entry block. For predecessors
that are not yet visited, we create virtual registers to hold the swifterror
values at the end of the predecessor. The assignments are saved in
SwiftErrorWorklist and will be materialized at the end of visiting the basic
block.
When visiting a load from a swifterror value, we copy from the current virtual
register assignment. When visiting a store to a swifterror value, we create a
virtual register to hold the swifterror value and update SwiftErrorMap to
track the current virtual register assignment.
Differential Revision: http://reviews.llvm.org/D18108
llvm-svn: 265433
Nirav Dave [Tue, 5 Apr 2016 18:11:01 +0000 (18:11 +0000)]
Fix missing period in no-jump-table flag comment. NFC.
llvm-svn: 265432
Sanjay Patel [Tue, 5 Apr 2016 18:09:36 +0000 (18:09 +0000)]
add tests to show missing optimization from D18230
llvm-svn: 265431
Sanjay Patel [Tue, 5 Apr 2016 18:00:47 +0000 (18:00 +0000)]
add example usage and workflow to --help output
llvm-svn: 265430
David Blaikie [Tue, 5 Apr 2016 17:51:40 +0000 (17:51 +0000)]
llvm-dwp: Simplify hashing code a bit
llvm-svn: 265426
Nirav Dave [Tue, 5 Apr 2016 17:50:43 +0000 (17:50 +0000)]
Add -fno-jump-tables and-fjump-tables flags
Add no-jump-tables flag to disable use of jump tables when lowering
switch statements
Reviewers: echristo, hans
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D18407
llvm-svn: 265425
Rui Ueyama [Tue, 5 Apr 2016 17:47:29 +0000 (17:47 +0000)]
Fix formatting.
llvm-svn: 265424
Tobias Grosser [Tue, 5 Apr 2016 17:40:07 +0000 (17:40 +0000)]
Add test case forgotten in r265379.
Thanks Johannes for reminding me.
llvm-svn: 265423
Stephane Sezer [Tue, 5 Apr 2016 17:34:38 +0000 (17:34 +0000)]
Fix dotest.py '-p' option for multi-process mode
Summary:
The '-p' option for dotest.py was ignored in multiprocess mode,
as the -p argument to the inferior would overwrite the -p argument
passed on the command line.
Reviewers: zturner, tfiala
Subscribers: lldb-commits, sas
Differential Revision: http://reviews.llvm.org/D18779
Change by Francis Ricci <fjricci@fb.com>
llvm-svn: 265422
Stephane Sezer [Tue, 5 Apr 2016 17:30:31 +0000 (17:30 +0000)]
Update watchpoint help to use new -s flag
Summary: Flag updated in D233237
Reviewers: spyffe, jingham, Eugene.Zelenko
Subscribers: lldb-commits, sas
Differential Revision: http://reviews.llvm.org/D18660
Change by Francis Ricci <fjricci@fb.com>
llvm-svn: 265421
Stephane Sezer [Tue, 5 Apr 2016 17:29:19 +0000 (17:29 +0000)]
Print environment when dumping arch triple
Summary: Print environment from triple if it exists.
Reviewers: tfiala, clayborg
Subscribers: lldb-commits, sas
Differential Revision: http://reviews.llvm.org/D18620
Change by Francis Ricci <fjricci@fb.com>
llvm-svn: 265420
Stephane Sezer [Tue, 5 Apr 2016 17:27:52 +0000 (17:27 +0000)]
Make sure to update Target arch if environment changed
Summary: Fixes "target list" for non-android linux platforms (ie gnu, gnueabi)
Reviewers: jasonmolenda, tfiala, clayborg, tberghammer
Subscribers: tberghammer, danalbert, lldb-commits, sas
Differential Revision: http://reviews.llvm.org/D18631
Change by Francis Ricci <fjricci@fb.com>
llvm-svn: 265419
Stephane Sezer [Tue, 5 Apr 2016 17:25:32 +0000 (17:25 +0000)]
Allow gdbremote process to read modules from memory
Summary:
The logic to read modules from memory was added to LoadModuleAtAddress
in the dynamic loader, but not in process gdb remote. This means that when
the remote uses svr4 packets to give library info, libraries only present
on the remote will not be loaded.
This patch therefore involves some code duplication from LoadModuleAtAddress
in the dynamic loader, but removing this would require some amount of code
refactoring.
Reviewers: ADodds, tberghammer, tfiala, deepak2427, ted
Subscribers: tfiala, lldb-commits, sas
Differential Revision: http://reviews.llvm.org/D18531
Change by Francis Ricci <fjricci@fb.com>
llvm-svn: 265418
Sanjay Patel [Tue, 5 Apr 2016 17:24:54 +0000 (17:24 +0000)]
[InstCombine] regenerate checks
utils/update_test_checks.py was improved with:
http://reviews.llvm.org/rL265414
to CHECK-NEXT the first line of the IR function. This ensures that nothing bad
has happened before that.
llvm-svn: 265417
Sanjay Patel [Tue, 5 Apr 2016 17:12:19 +0000 (17:12 +0000)]
[x86] regenerate checks
utils/update_test_checks.py was improved with:
http://reviews.llvm.org/rL265414
to include the first line of the function (expected to be
a comment line). This ensures that nothing bad has happened
before the first actual line of checked asm. It also matches
the existing behavior of the old script.
llvm-svn: 265416
JF Bastien [Tue, 5 Apr 2016 17:01:52 +0000 (17:01 +0000)]
WebAssembly: fix cfg-stackify test
It was broken by reshuffling induced by r265397 'Don't delete empty preheaders in CodeGenPrepare if it would create a critical edge'.
llvm-svn: 265415
Sanjay Patel [Tue, 5 Apr 2016 16:49:07 +0000 (16:49 +0000)]
check or check-next the first line of the function too
We could make this an option if people don't like it.
But since part of the reason for using a script to generate
checks is to prevent lazy checking that lets bugs crawl
through, let's have the script check the first line too.
For asm tests, it ensures that nothing unexpected has
happened before the first line of asm. This matches the
existing behavior of update_llc_test_checks.py.
More discussion in PR22897:
https://llvm.org/bugs/show_bug.cgi?id=22897
llvm-svn: 265414
Johannes Doerfert [Tue, 5 Apr 2016 16:18:53 +0000 (16:18 +0000)]
Remove dead code and comment [NFC]
llvm-svn: 265413
Valery Pykhtin [Tue, 5 Apr 2016 16:18:16 +0000 (16:18 +0000)]
[TableGen] AsmMatcherEmitter.cpp: replace a sequence of "if" to "switch" in emitValidateOperandClass.
Differential Revision: http://reviews.llvm.org/D18394
llvm-svn: 265412
Jacques Pienaar [Tue, 5 Apr 2016 16:18:13 +0000 (16:18 +0000)]
[lanai] LanaiSetflagAluCombiner more conservative
Summary: LanaiSetflagAluCombiner could previously combine instructions across basic building blocks even when not legal. Make the LanaiSetflagAluCombiner more conservative to avoid this.
Reviewers: eliben
Subscribers: joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D18746
llvm-svn: 265411
Johannes Doerfert [Tue, 5 Apr 2016 16:15:44 +0000 (16:15 +0000)]
[WWW] Update passes
llvm-svn: 265410
Sam Parker [Tue, 5 Apr 2016 16:01:25 +0000 (16:01 +0000)]
[ARM] Cleanup of smul and smla instruction descriptions
Removed the SDNode argument passed to the AI_smul and AI_smla multiclass
definitions as they are always mul.
Differential Revision: http://reviews.llvm.org/D18791
llvm-svn: 265409
Konstantin Zhuravlyov [Tue, 5 Apr 2016 16:00:58 +0000 (16:00 +0000)]
[AMDGPU] Emit linkonce and linkonce_odr symbols
Differential Revision: http://reviews.llvm.org/D18726
llvm-svn: 265408
Haicheng Wu [Tue, 5 Apr 2016 15:37:08 +0000 (15:37 +0000)]
[BlockPlacement] Remove an unnecessary continue
NFC.
llvm-svn: 265407
Kuba Brecka [Tue, 5 Apr 2016 15:22:00 +0000 (15:22 +0000)]
Reverting r265401 ("Enabling AddressSanitizer tests, they should work now.")
llvm-svn: 265406
Andrey Turetskiy [Tue, 5 Apr 2016 15:04:26 +0000 (15:04 +0000)]
[X86] Introduction of -march=lakemont.
Differential Revision: http://reviews.llvm.org/D18651
llvm-svn: 265405
Rafael Espindola [Tue, 5 Apr 2016 14:47:28 +0000 (14:47 +0000)]
Update for llvm change.
llvm-svn: 265404
Rafael Espindola [Tue, 5 Apr 2016 14:47:22 +0000 (14:47 +0000)]
Use ArrayRef for contiguous areas in ELF. NFC.
This just simplifies the code a bit. More so in lld.
llvm-svn: 265403
Chuang-Yu Cheng [Tue, 5 Apr 2016 14:21:32 +0000 (14:21 +0000)]
Add missing test for the "Don't delete empty preheaders" added in r265397
Author: Tom Jablin (tjablin)
llvm-svn: 265402
Kuba Brecka [Tue, 5 Apr 2016 14:14:07 +0000 (14:14 +0000)]
Enabling AddressSanitizer tests, they should work now.
llvm-svn: 265401
Kuba Brecka [Tue, 5 Apr 2016 14:13:22 +0000 (14:13 +0000)]
Fixing AddressSanitizer tests (update expectations for current ASan, make it work on OS X 10.10 and older).
llvm-svn: 265400
Rafael Espindola [Tue, 5 Apr 2016 14:10:18 +0000 (14:10 +0000)]
Centralize the definition of a few types. NFC.
llvm-svn: 265399
Tamas Berghammer [Tue, 5 Apr 2016 14:08:18 +0000 (14:08 +0000)]
[NFC] Cleanup the code used to run shell commands from tests
Previously we had 3 different method to run shell commands on the
target and 4 copy of code waiting until a given file appears on the
target device (used for syncronization). This CL merges these methods
to 1 run_platform_command and 1 wait_for_file_on_target functions
located in some utility classes.
Differential revision: http://reviews.llvm.org/D18789
llvm-svn: 265398
Chuang-Yu Cheng [Tue, 5 Apr 2016 14:06:20 +0000 (14:06 +0000)]
Don't delete empty preheaders in CodeGenPrepare if it would create a critical edge
Presently, CodeGenPrepare deletes all nearly empty (only phi and branch)
basic blocks. This pass can delete loop preheaders which frequently creates
critical edges. A preheader can be a convenient place to spill registers to
the stack. If the entrance to a loop body is a critical edge, then spills
may occur in the loop body rather than immediately before it. This patch
protects loop preheaders from deletion in CodeGenPrepare even if they are
nearly empty.
Since the patch alters the CFG, it affects a large number of test cases.
In most cases, the changes are merely cosmetic (basic blocks have different
names or instruction orders change slightly). I am somewhat concerned about
the test/CodeGen/Mips/brdelayslot.ll test case. If the loop preheader is not
deleted, then the MIPS backend does not take advantage of a branch delay
slot. Consequently, I would like some close review by a MIPS expert.
The patch also partially subsumes D16893 from George Burgess IV. George
correctly notes that CodeGenPrepare does not actually preserve the dominator
tree. I think the dominator tree was usually not valid when CodeGenPrepare
ran, but I am using LoopInfo to mark preheaders, so the dominator tree is
now always valid before CodeGenPrepare.
Author: Tom Jablin (tjablin)
Reviewers: hfinkel george.burgess.iv vkalintiris dsanders kbarton cycheng
http://reviews.llvm.org/D16984
llvm-svn: 265397
Kuba Brecka [Tue, 5 Apr 2016 13:59:45 +0000 (13:59 +0000)]
Enabling TSan tests, they should work now.
llvm-svn: 265396
Kuba Brecka [Tue, 5 Apr 2016 13:57:42 +0000 (13:57 +0000)]
Fix ThreadSanitizer test cases to work on OS X 10.10 and older.
llvm-svn: 265395