Micah Villmow [Thu, 26 Jul 2012 21:22:00 +0000 (21:22 +0000)]
Add support for v16i32/v16i64 into the code generator. This is required for backends that use i32/i64 vectors for the getSetCCResultType function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160814
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 26 Jul 2012 20:38:52 +0000 (20:38 +0000)]
Make comments in Debug.cpp and Debug.h consistent. Rename SetCurrentDebugType;
Function names should be camel case, and start with a lower case letter. No
functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160813
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 26 Jul 2012 19:42:56 +0000 (19:42 +0000)]
Use an otherwise unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160798
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 26 Jul 2012 18:38:11 +0000 (18:38 +0000)]
Start scaffolding for a MachineTraceMetrics analysis pass.
This is still a work in progress.
Out-of-order CPUs usually execute instructions from multiple basic
blocks simultaneously, so it is necessary to look at longer traces when
estimating the performance effects of code transformations.
The MachineTraceMetrics analysis will pick a typical trace through a
given basic block and provide performance metrics for the trace. Metrics
will include:
- Instruction count through the trace.
- Issue count per functional unit.
- Critical path length, and per-instruction 'slack'.
These metrics can be used to determine the performance limiting factor
when executing the trace, and how it will be affected by a code
transformation.
Initially, this will be used by the early if-conversion pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160796
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 26 Jul 2012 17:43:27 +0000 (17:43 +0000)]
Add a floor intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160791
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 26 Jul 2012 17:10:46 +0000 (17:10 +0000)]
do null checks for a few more Emit*() functions.
Thanks Eli for noticing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160787
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 26 Jul 2012 09:26:40 +0000 (09:26 +0000)]
Stop reassociate from looking through expressions of arbitrary complexity. This
is a temporary measure until my fix for PR13021 is ready.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160778
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 26 Jul 2012 08:08:31 +0000 (08:08 +0000)]
Take people straight to the contents of the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160777
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 26 Jul 2012 08:04:09 +0000 (08:04 +0000)]
Add the list of code owners to the top level of the LLVM source tree to
hopefully make it more visible. Adjust the web-docs to have a link to
this file rather than the list itself. I described code owners as also
being gatekeepers for their part of the code, which I think is true but
isn't in the code owner explanation on the web page.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160776
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 26 Jul 2012 07:48:28 +0000 (07:48 +0000)]
Make l/q suffixes on AVX forms of scalar convert instructions consistent with their non-AVX forms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160775
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 26 Jul 2012 02:24:43 +0000 (02:24 +0000)]
Fix call setup for PIC.
Patch by Reed Kotler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160774
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Wed, 25 Jul 2012 22:01:31 +0000 (22:01 +0000)]
Fix two typos in the doc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160762
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 25 Jul 2012 21:41:37 +0000 (21:41 +0000)]
Differentially encode all MC register lists.
This simplifies MCRegisterInfo and shrinks the target descriptions a bit
more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160758
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 25 Jul 2012 21:19:40 +0000 (21:19 +0000)]
It's not safe to blindly remove invoke instructions. This happens when we
encounter an invoke of an allocation function. This should fix the dragonegg
bootstrap. Testcase to follow, later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160757
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Wed, 25 Jul 2012 20:17:14 +0000 (20:17 +0000)]
Update testing case for Atom when disabling rematerialization in
TwoAddressInstructionPass.
The generated code for Atom has a different code sequence. This is realted
to commit r160749.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160755
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 25 Jul 2012 19:06:29 +0000 (19:06 +0000)]
You cannot call removeModule on a JIT with no modules. Patch by Verena
Beckham <verena@codeplay.com>. Reviewed by Jim Grosbach.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160753
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 25 Jul 2012 18:49:28 +0000 (18:49 +0000)]
revert r160742: it's breaking CMake build
original commit msg:
MemoryBuiltins: add support to determine the size of strdup'ed non-constant strings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160751
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Wed, 25 Jul 2012 18:28:13 +0000 (18:28 +0000)]
Disable rematerialization in TwoAddressInstructionPass.
It is redundant; RegisterCoalescer will do the remat if it can't eliminate
the copy. Collected instruction counts before and after this. A few extra
instructions are generated due to spilling but it is normal to see these kinds
of changes with almost any small codegen change, according to Jakob.
This also fixed rdar://
11830760 where xor is expected instead of movi0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160749
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 25 Jul 2012 18:04:24 +0000 (18:04 +0000)]
Don't add null characters to the end of the APFloat string buffer.
Report/patch inspiration by Olaf Krzikalla.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160744
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 25 Jul 2012 17:29:22 +0000 (17:29 +0000)]
MemoryBuiltins: add support to determine the size of strdup'ed non-constant strings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160742
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 25 Jul 2012 17:18:59 +0000 (17:18 +0000)]
add EmitStrNLen()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160741
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 25 Jul 2012 17:15:15 +0000 (17:15 +0000)]
Preserve 2-addr constraints in ConnectedVNInfoEqClasses.
When a live range splits into multiple connected components, we would
arbitrarily assign <undef> uses to component 0. This is wrong when the
use is tied to a def that gets assigned to a different component:
%vreg69<def> = ADD8ri %vreg68<undef>, 1
The use and def must get the same virtual register.
Fix this by assigning <undef> uses to the same component as the value
defined by the instruction, if any:
%vreg69<def> = ADD8ri %vreg69<undef>, 1
This fixes PR13402. The PR has a test case which I am not including
because it is unlikely to keep exposing this behavior in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160739
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 25 Jul 2012 17:02:47 +0000 (17:02 +0000)]
ARM: Don't assume an SDNode is a constant.
Before accessing a node as a ConstandSDNode, make sure it actually is one.
No testcase of non-trivial size.
rdar://
11948669
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160735
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 25 Jul 2012 16:49:11 +0000 (16:49 +0000)]
Verify two-address constraints more carefully.
Include <undef> operands and virtual registers after leaving SSA form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160734
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 25 Jul 2012 16:46:31 +0000 (16:46 +0000)]
make all Emit*() functions consult the TargetLibraryInfo information before creating a call to a library function.
Update all clients to pass the TLI information around.
Previous draft reviewed by Eli.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160733
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 25 Jul 2012 15:42:45 +0000 (15:42 +0000)]
Fix typos. Thanks to Matt Beaumont-Gay for noticing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160731
91177308-0d34-0410-b5e6-
96231b3b80d8
Axel Naumann [Wed, 25 Jul 2012 13:46:11 +0000 (13:46 +0000)]
Twine: fix link to source, add link to class doc and container section.
80 char lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160726
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 25 Jul 2012 13:41:10 +0000 (13:41 +0000)]
When a return struct pointer is passed in registers, the called has nothing
to pop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160725
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 25 Jul 2012 13:35:45 +0000 (13:35 +0000)]
Factor a long list of conditions into a predicate function. No functionality
change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160724
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 25 Jul 2012 09:45:37 +0000 (09:45 +0000)]
Don't perform an overaligned load in this test, since that's undefined
behaviour that might be exploited one day.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160714
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 25 Jul 2012 09:14:54 +0000 (09:14 +0000)]
When folding a load from a global constant, if the load started in the middle
of an array element (rather than at the beginning of the element) and extended
into the next element, then the load from the second element was being handled
wrong due to incorrect updating of the notion of which byte to load next. This
fixes PR13442. Thanks to Chris Smowton for reporting the problem, analyzing it
and providing a fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160711
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 25 Jul 2012 03:16:47 +0000 (03:16 +0000)]
Eliminate the stack slot used to save the global base register.
The long branch pass (fixed in r160601) no longer uses the global base register
to compute addresses of branch destinations, so it is not necessary to reserve
a slot on the stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160703
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 24 Jul 2012 22:56:06 +0000 (22:56 +0000)]
Add a cpu to the test. Should fix the atom bot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160701
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 24 Jul 2012 21:55:04 +0000 (21:55 +0000)]
Add a triple to the test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160698
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 24 Jul 2012 21:40:17 +0000 (21:40 +0000)]
In order to correctly compile
struct s {
double x1;
float x2;
};
__attribute__((regparm(3))) struct s f(int a, int b, int c);
void g(void) {
f(41, 42, 43);
}
We need to be able to represent passing the address of s to f (sret) in a
register (inreg). Turns out that all that is needed is to not mark them as
mutually incompatible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160695
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 24 Jul 2012 21:40:01 +0000 (21:40 +0000)]
Fix a bug in the x86 disassembler's symbolic disassembly support for Jcc-Jump
if Condition Is Met instuctions that was not correctly determining the target
instruction.
So for a jne rel32 instruction:
% cat x.s
.byte 0x0f, 0x85, 0x09, 0x00, 0x00, 0x00
% as x.s
it was incorrectly deterining the target:
% otool -q -tv a.out
a.out:
(__TEXT,__text) section
0000000000000000 jne 0xd
and with the fix it gets this correct as:
% otool -q -tv a.out
a.out:
(__TEXT,__text) section
0000000000000000 jne 0xf
rdar://
11505997
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160694
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 24 Jul 2012 21:33:00 +0000 (21:33 +0000)]
Don't delete one more instruction than we're allowed to. This should fix the
Darwin bootstrap. Testcase exists but isn't fully reduced, I expect to commit
the testcase this evening.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160693
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 24 Jul 2012 21:07:56 +0000 (21:07 +0000)]
[Object] Remove unneeded const_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160692
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Tue, 24 Jul 2012 21:00:36 +0000 (21:00 +0000)]
add a few more functions to TargetLibraryInfo:
fputc, memchr, memcmp, putchar, puts, strchr, strncmp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160690
91177308-0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Tue, 24 Jul 2012 20:04:16 +0000 (20:04 +0000)]
ELF does not imply GNU/Linux. Do not assume GNU conventions just because we
are targeting an ELF platform. Only fold gs-relative (and fs-relative) loads
if it is actually sensible to do so for the target platform.
This fixes PR13438.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160687
91177308-0d34-0410-b5e6-
96231b3b80d8
Anshuman Dasgupta [Tue, 24 Jul 2012 19:48:24 +0000 (19:48 +0000)]
Add new interfaces to support ldd's ReaderElf.cpp.
Patch by Sid Manning!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160685
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Tue, 24 Jul 2012 17:25:06 +0000 (17:25 +0000)]
TargetLibraryInfo: add strn?cat, strn?cpy, and strn?len
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160678
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Tue, 24 Jul 2012 16:28:13 +0000 (16:28 +0000)]
teach objectsize about strdup() and strndup()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160676
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 24 Jul 2012 10:51:42 +0000 (10:51 +0000)]
Clean whitespaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160668
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 24 Jul 2012 07:21:08 +0000 (07:21 +0000)]
Teach globalopt to not nuke all stores to globals. Keep them around of they
might be deliberate "one time" leaks, so that leak checkers can find them.
This is a reapply of r160602 with the fix that this time I'm committing the
code I thought I was committing last time; the I->eraseFromParent() goes
*after* the break out of the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160664
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 24 Jul 2012 04:11:21 +0000 (04:11 +0000)]
Change llvm_unreachable in SplitVectorOperand to report_fatal_error. Keeps release builds from crashing if code uses an intrinsic with an illegal type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160661
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 24 Jul 2012 00:08:26 +0000 (00:08 +0000)]
Fix function MipsCodeEmitter::emitExternalSymbolAddress to pass test
ExecutionEngine/test-fp.ll.
Patch by Petar Jovanovic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160653
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 23 Jul 2012 23:45:54 +0000 (23:45 +0000)]
Add basic ability to setup call frame, and make procedure calls.
Hello world will compile and execute with this patch.
Patch by Reed Kotler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160651
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 23 Jul 2012 20:54:17 +0000 (20:54 +0000)]
Fix a "Bad fd number" error on some platforms due to a less portable
redirection in the system call.
Patch by Andy Gibbs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160644
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 23 Jul 2012 20:33:29 +0000 (20:33 +0000)]
make ConstantRange::zeroExtend() optimal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160643
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Mon, 23 Jul 2012 20:24:23 +0000 (20:24 +0000)]
Add operator== to APSInt. This will compare the signed bit before doing
the comparison. This prevents large unsigned integers from being equal to
signed negative integers of the same bit width.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160642
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 23 Jul 2012 19:27:31 +0000 (19:27 +0000)]
An objc_retain can serve as a may-use for a different pointer.
rdar://
11931823.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160637
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 23 Jul 2012 19:19:20 +0000 (19:19 +0000)]
Add comment for relocations MO_HIGHER and HIGHEST in MipsBaseInfo.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160636
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Mon, 23 Jul 2012 16:42:45 +0000 (16:42 +0000)]
Test revert of test changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160632
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Mon, 23 Jul 2012 16:37:24 +0000 (16:37 +0000)]
Test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160631
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 23 Jul 2012 13:44:15 +0000 (13:44 +0000)]
Suppress a warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160629
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 23 Jul 2012 09:04:00 +0000 (09:04 +0000)]
Doxygenify the comments of ISD nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160623
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Mon, 23 Jul 2012 08:51:15 +0000 (08:51 +0000)]
Fix a typo (the the => the)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160621
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 23 Jul 2012 07:59:50 +0000 (07:59 +0000)]
Fixed DAGCombine optimizations which generate select_cc for targets
that do not support it (X86 does not lower select_cc).
PR: 13428
Together with Michael Kuperstein <michael.m.kuperstein@intel.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160619
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 23 Jul 2012 05:38:07 +0000 (05:38 +0000)]
Tidy up. Fix indentation and remove trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160617
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 23 Jul 2012 04:34:49 +0000 (04:34 +0000)]
Change llvm_unreachable in SplitVectorResult to report_fatal_error. Keeps release builds from crashing if code uses an intrinsic with an illegal type. For instance 256-bit AVX intrinsics without having AVX enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160616
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 22 Jul 2012 05:19:32 +0000 (05:19 +0000)]
Move the initialization of the bounds checking pass. The pass itself
moved earlier. This fixes some layering issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160611
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 22 Jul 2012 03:04:57 +0000 (03:04 +0000)]
ExecutionEngine/TargetSelect.cpp: Override default triple as LLVM_HOSTTRIPLE.
In current implementation, JIT should run only on host.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160610
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 22 Jul 2012 03:04:52 +0000 (03:04 +0000)]
autoconf: Re-introduce LLVM_HOSTTRIPLE since r143500, as rework of PR11060.
cmake: Add LLVM_HOSTTRIPLE. For now, it is same as TARGET_TRIPLE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160609
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 21 Jul 2012 09:03:15 +0000 (09:03 +0000)]
Revert r160602.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160603
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 21 Jul 2012 08:29:45 +0000 (08:29 +0000)]
Teach globalopt to play nice with leak checkers. This is a reapplication of
r160529 that was subsequently reverted. The fix was to not call
GV->eraseFromParent() right before the caller does the same. The existing
testcases already caught this bug if run under valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160602
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 21 Jul 2012 03:30:44 +0000 (03:30 +0000)]
Fix Mips long branch pass.
This pass no longer requires that the global pointer value be saved to the
stack or register since it uses bal instruction to compute branch distance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160601
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 21 Jul 2012 03:09:04 +0000 (03:09 +0000)]
Add HIGHER and HIGHEST relocations to Mips backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160599
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 21 Jul 2012 02:20:33 +0000 (02:20 +0000)]
Revert accidental commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160598
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 21 Jul 2012 02:15:19 +0000 (02:15 +0000)]
Add VK_Mips_HIGHER and VK_Mips_HIGHEST to MCSymbolRefExpr::VariantKind.
Test case will be added later when long branch patch is checked in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160597
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Fri, 20 Jul 2012 23:07:40 +0000 (23:07 +0000)]
baby steps toward fixing some problems with inbound GEPs that overflow, as discussed 2 months ago or so.
Make sure we do not emit index computations with NSW flags so that we dont get an undef value if the GEP overflows
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160589
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Fri, 20 Jul 2012 22:39:33 +0000 (22:39 +0000)]
move the bounds checking pass to the instrumentation folder, where it belongs. I dunno why in the world I dropped it in the Scalar folder in the first place.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160587
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 20 Jul 2012 22:05:57 +0000 (22:05 +0000)]
Remove unused private member variables uncovered by the recent changes to clang's -Wunused-private-field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160583
91177308-0d34-0410-b5e6-
96231b3b80d8
Galina Kistanova [Fri, 20 Jul 2012 21:30:52 +0000 (21:30 +0000)]
Fix few warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160576
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 20 Jul 2012 21:29:31 +0000 (21:29 +0000)]
Avoid folding loads that are unsafe to move.
LiveRangeEdit::foldAsLoad() can eliminate a register by folding a load
into its only use. Only do that when the load is safe to move, and it
won't extend any live ranges.
This fixes PR13414.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160575
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 20 Jul 2012 21:09:18 +0000 (21:09 +0000)]
Fix a dangling StringRef bug in the auto upgrader. In one case, we reset
CI's name, and then used the StringRef pointing at its old name. I'm
fixing it by storing the name in a std::string, and hoisting the
renaming logic to happen always. This is nicer anyways as it will allow
the upgraded IR to have the same names as the input IR in more cases.
Another bug found by AddressSanitizer. Woot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160572
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 20 Jul 2012 20:49:53 +0000 (20:49 +0000)]
Split loop exiting edges more aggressively.
PHIElimination splits critical edges when it predicts it can resolve
interference and eliminate copies. It doesn't split the edge if the
interference wouldn't be resolved anyway because the phi-use register is
live in the critical edge anyway.
Teach PHIElimination to split loop exiting edges with interference, even
if it wouldn't resolve the interference. This removes the necessary
copies from the loop, which is still an improvement from injecting the
copies into the loop.
The test case demonstrates the improvement. Before:
LBB0_1:
cmpb $0, (%rdx)
leaq 1(%rdx), %rdx
movl %esi, %eax
je LBB0_1
After:
LBB0_1:
cmpb $0, (%rdx)
leaq 1(%rdx), %rdx
je LBB0_1
movl %esi, %eax
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160571
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 20 Jul 2012 19:49:33 +0000 (19:49 +0000)]
Try to unbreak the windows build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160567
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Jul 2012 18:29:44 +0000 (18:29 +0000)]
SourceMgr: Use has_colors() instead of just is_displayed() before trying to use
color.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160559
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Jul 2012 18:29:41 +0000 (18:29 +0000)]
raw_ostream: Add a has_colors() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160558
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Jul 2012 18:29:38 +0000 (18:29 +0000)]
Process: Add sys::Process::FileDescriptorHasColors().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160557
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 20 Jul 2012 18:29:34 +0000 (18:29 +0000)]
lit: Use close_fds=True on UNIX, to avoid file descriptor pollution of
subprocesses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160556
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Fri, 20 Jul 2012 10:36:17 +0000 (10:36 +0000)]
Fix assertion in jump threading (PR13405).
GetBestDestForJumpOnUndef() assumes there is at least 1 successor, which isn't
true if the block ends in an indirect branch with no successors. Fix this by
bailing out earlier in this case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160546
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 20 Jul 2012 09:54:50 +0000 (09:54 +0000)]
[asan] make sure that the crash callbacks do not get merged (Chandler's idea: insert an empty InlineAsm). Change the order in which the new BBs are inserted: the slow path BB is insert between old BBs, the crash BB is inserted at the end. Don't create an empty BB (introduced by recent commits). Update the test. The experimental code that does manual crash callback merge will most likely be deleted later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160544
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 20 Jul 2012 07:03:46 +0000 (07:03 +0000)]
Don't use implicit register operands to calculate L-bit for AVX instructions. Needed because super reg defs and kills are added as implicit operands on 128-bit instructions. Fixes PR13349. Patch by Jose Fonseca.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160543
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 20 Jul 2012 03:38:19 +0000 (03:38 +0000)]
Make RegisterOperand a subclass of DAGOperand so that RegisterOperands can be passed into multiclasses that take DAGOperands as multiclass parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160540
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 19 Jul 2012 23:59:21 +0000 (23:59 +0000)]
Revert r160529 due to crashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160532
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Thu, 19 Jul 2012 23:40:38 +0000 (23:40 +0000)]
Fix crash in machine verifier when trying to print the def of a register which has no def
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160531
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 19 Jul 2012 22:35:28 +0000 (22:35 +0000)]
Don't wipe out global variables that are probably storing pointers to heap
memory. This makes clang play nice with leak checkers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160529
91177308-0d34-0410-b5e6-
96231b3b80d8
Galina Kistanova [Thu, 19 Jul 2012 21:43:55 +0000 (21:43 +0000)]
Reverting r 160419.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160525
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Gurd [Thu, 19 Jul 2012 19:05:37 +0000 (19:05 +0000)]
Adds the family codes for the Midview Atom processors so that the
Atom buildbot will auto-detect Atom.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160521
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Gurd [Thu, 19 Jul 2012 18:53:21 +0000 (18:53 +0000)]
Fix remaining lit tests which were failing when run on an Atom
processor.
Patches by Tyler Nowicki, Andy Zhang, and Preston Gurd!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160520
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Pop [Thu, 19 Jul 2012 18:24:50 +0000 (18:24 +0000)]
default to use -mv4 when no version of Hexagon has been specified
This fixes a bunch of make check failures of the form:
Unknown Architecture Version.
UNREACHABLE executed at ../lib/Target/Hexagon/HexagonSubtarget.cpp:60!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160518
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 19 Jul 2012 16:27:45 +0000 (16:27 +0000)]
reimplement truncate() to make it optimal.
It is optimal at least up to 7 bits (I've tested all such cases)
This change to truncate() allows a little simplification to the multiplication code,
and it also makes multiplication optimal :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160512
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 19 Jul 2012 15:00:34 +0000 (15:00 +0000)]
Pull the simple parts of DenseMapInfo<DebugLoc> inline and prune includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160507
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 19 Jul 2012 13:40:09 +0000 (13:40 +0000)]
test/DebugInfo/dwarfdump-test.test: Tweak expressions for Win32 to match backslashes. They are still odd, though.
For example, Paths are printed on Win32 as below;
/tmp/dbginfo\def2.cc:4:0
/tmp/dbginfo\include\decl2.h:1:0
/tmp/include\decl.h:5:0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160505
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 19 Jul 2012 10:46:05 +0000 (10:46 +0000)]
Replace some explicit compare loops with std::equal.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160501
91177308-0d34-0410-b5e6-
96231b3b80d8
Jush Lu [Thu, 19 Jul 2012 09:49:00 +0000 (09:49 +0000)]
[arm-fast-isel] Add support for vararg function calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160500
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 19 Jul 2012 07:03:58 +0000 (07:03 +0000)]
DebugInfo library: add support for fetching absolute paths to source files
(instead of basenames) from DWARF. Use this behavior in llvm-dwarfdump tool.
Reviewed by Benjamin Kramer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160496
91177308-0d34-0410-b5e6-
96231b3b80d8
Galina Kistanova [Thu, 19 Jul 2012 04:50:12 +0000 (04:50 +0000)]
Fixed few warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160493
91177308-0d34-0410-b5e6-
96231b3b80d8