OSDN Git Service
Xerxes Ranby [Mon, 21 Sep 2009 08:08:29 +0000 (08:08 +0000)]
Update cmake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82449
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 21 Sep 2009 07:19:08 +0000 (07:19 +0000)]
Verify that phi instructions refer to MBBs in the CFG.
The machine code verifier no longer tolerates phi instructions with noop
operands. All MBBs on a phi instruction must be in the CFG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82448
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 06:48:08 +0000 (06:48 +0000)]
enable non-local analysis and PRE of large store -> little load.
This doesn't kick in too much because of phi translation issues,
but this can be resolved in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82447
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 06:30:24 +0000 (06:30 +0000)]
convert an std::pair to an explicit struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82446
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 06:24:16 +0000 (06:24 +0000)]
move some functions, add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82444
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 06:22:46 +0000 (06:22 +0000)]
split HandleLoadFromClobberingStore in two pieces: one that does the
analysis, one that does the xform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82443
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 06:04:07 +0000 (06:04 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82442
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 21 Sep 2009 05:58:35 +0000 (05:58 +0000)]
Register the MachineModuleInfo for the ARM JIT, and update JITDwarfEmitter to
assert if the setModuleInfo hasn't been called.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82441
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 05:57:47 +0000 (05:57 +0000)]
add pr#
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82440
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 05:57:11 +0000 (05:57 +0000)]
Improve GVN to be able to forward substitute a small load
from a piece of a large store when both are in the same block.
This allows clang to compile the testcase in PR4216 to this code:
_test_bitfield:
movl 4(%esp), %eax
movl %eax, %ecx
andl $-65536, %ecx
orl $32962, %eax
andl $40186, %eax
orl %ecx, %eax
ret
This is not ideal, but is a whole lot better than the code produced
by llvm-gcc:
_test_bitfield:
movw $-32574, %ax
orw 4(%esp), %ax
andw $-25350, %ax
movw %ax, 4(%esp)
movw 7(%esp), %cx
shlw $8, %cx
movzbl 6(%esp), %edx
orw %cx, %dx
movzwl %dx, %ecx
shll $16, %ecx
movzwl %ax, %eax
orl %ecx, %eax
ret
and dramatically better than that produced by gcc 4.2:
_test_bitfield:
pushl %ebx
call L3
"L00000000001$pb":
L3:
popl %ebx
movl 8(%esp), %eax
leal 0(,%eax,4), %edx
sarb $7, %dl
movl %eax, %ecx
andl $7168, %ecx
andl $-7201, %ebx
movzbl %dl, %edx
andl $1, %edx
sall $5, %edx
orl %ecx, %ebx
orl %edx, %ebx
andl $24, %eax
andl $-58336, %ebx
orl %eax, %ebx
orl $32962, %ebx
movl %ebx, %eax
popl %ebx
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82439
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 05:52:45 +0000 (05:52 +0000)]
add a helper method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82438
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 21 Sep 2009 04:32:32 +0000 (04:32 +0000)]
Fix PR4986. "r1024 = insert_subreg r1024, undef, 2" cannot be turned in an implicit_def. Instead, it's an identity copy so it should be eliminated. Also make sure to update livevariable kill information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82436
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 21 Sep 2009 03:56:00 +0000 (03:56 +0000)]
Don't allow formatted_ostream to be unbuffered, even if its underlying buffer
is.
- The problem is that formatted_ostream forces its underlying buffer to be
unbuffered, so if some client happens to wrap a formatted_ostream around
something, but still use the underlying stream, then we can end up writing on
a fully unbuffered output (which was never intended to be unbuffered).
- This makes clang (and presumably llvm-gcc) -emit-llvm -S a mere 10x faster.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82434
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 02:53:57 +0000 (02:53 +0000)]
one case handled, expanded another testcase inline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82427
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 02:42:51 +0000 (02:42 +0000)]
formatting cleanups, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82426
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 21 Sep 2009 02:34:59 +0000 (02:34 +0000)]
Add documentation on how to use enable debug information in the JIT and use it with GDB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82425
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 02:30:42 +0000 (02:30 +0000)]
fix a FileCheck bug where:
; CHECK: foo
; CHECK-NOT: foo
; CHECK: bar
would always fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82424
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 21 Sep 2009 00:05:30 +0000 (00:05 +0000)]
Move ARM and X86 specific AsmParser tests into separate subdirectories, and only
run if appropriate target is supported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82419
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Sun, 20 Sep 2009 23:52:43 +0000 (23:52 +0000)]
Implement the JIT side of the GDB JIT debugging interface. To enable this
feature, either build the JIT in debug mode to enable it by default or pass
-jit-emit-debug to lli.
Right now, the only debug information that this communicates to GDB is call
frame information, since it's already being generated to support exceptions in
the JIT. Eventually, when DWARF generation isn't tied so tightly to AsmPrinter,
it will be easy to push that information to GDB through this interface.
Here's a step-by-step breakdown of how the feature works:
- The JIT generates the machine code and DWARF call frame info
(.eh_frame/.debug_frame) for a function into memory.
- The JIT copies that info into an in-memory ELF file with a symbol for the
function.
- The JIT creates a code entry pointing to the ELF buffer and adds it to a
linked list hanging off of a global descriptor at a special symbol that GDB
knows about.
- The JIT calls a function marked noinline that GDB knows about and has put an
internal breakpoint in.
- GDB catches the breakpoint and reads the global descriptor to look for new
code.
- When sees there is new code, it reads the ELF from the inferior's memory and
adds it to itself as an object file.
- The JIT continues, and the next time we stop the program, we are able to
produce a proper backtrace.
Consider running the following program through the JIT:
#include <stdio.h>
void baz(short z) {
long w = z + 1;
printf("%d, %x\n", w, *((int*)NULL)); // SEGFAULT here
}
void bar(short y) {
int z = y + 1;
baz(z);
}
void foo(char x) {
short y = x + 1;
bar(y);
}
int main(int argc, char** argv) {
char x = 1;
foo(x);
}
Here is a backtrace before this patch:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2aaaabdfbd10 (LWP 25476)]
0x00002aaaabe7d1a8 in ?? ()
(gdb) bt
#0 0x00002aaaabe7d1a8 in ?? ()
#1 0x0000000000000003 in ?? ()
#2 0x0000000000000004 in ?? ()
#3 0x00032aaaabe7cfd0 in ?? ()
#4 0x00002aaaabe7d12c in ?? ()
#5 0x00022aaa00000003 in ?? ()
#6 0x00002aaaabe7d0aa in ?? ()
#7 0x01000002abe7cff0 in ?? ()
#8 0x00002aaaabe7d02c in ?? ()
#9 0x0100000000000001 in ?? ()
#10 0x00000000014388e0 in ?? ()
#11 0x00007fff00000001 in ?? ()
#12 0x0000000000b870a2 in llvm::JIT::runFunction (this=0x1405b70,
F=0x14024e0, ArgValues=@0x7fffffffe050)
at /home/rnk/llvm-gdb/lib/ExecutionEngine/JIT/JIT.cpp:395
#13 0x0000000000baa4c5 in llvm::ExecutionEngine::runFunctionAsMain
(this=0x1405b70, Fn=0x14024e0, argv=@0x13f06f8, envp=0x7fffffffe3b0)
at /home/rnk/llvm-gdb/lib/ExecutionEngine/ExecutionEngine.cpp:377
#14 0x00000000007ebd52 in main (argc=2, argv=0x7fffffffe398,
envp=0x7fffffffe3b0) at /home/rnk/llvm-gdb/tools/lli/lli.cpp:208
And a backtrace after this patch:
Program received signal SIGSEGV, Segmentation fault.
0x00002aaaabe7d1a8 in baz ()
(gdb) bt
#0 0x00002aaaabe7d1a8 in baz ()
#1 0x00002aaaabe7d12c in bar ()
#2 0x00002aaaabe7d0aa in foo ()
#3 0x00002aaaabe7d02c in main ()
#4 0x0000000000b870a2 in llvm::JIT::runFunction (this=0x1405b70,
F=0x14024e0, ArgValues=...)
at /home/rnk/llvm-gdb/lib/ExecutionEngine/JIT/JIT.cpp:395
#5 0x0000000000baa4c5 in llvm::ExecutionEngine::runFunctionAsMain
(this=0x1405b70, Fn=0x14024e0, argv=..., envp=0x7fffffffe3c0)
at /home/rnk/llvm-gdb/lib/ExecutionEngine/ExecutionEngine.cpp:377
#6 0x00000000007ebd52 in main (argc=2, argv=0x7fffffffe3a8,
envp=0x7fffffffe3c0) at /home/rnk/llvm-gdb/tools/lli/lli.cpp:208
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82418
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 20 Sep 2009 23:30:31 +0000 (23:30 +0000)]
Work around a FileCheck bug, for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82416
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 22:56:43 +0000 (22:56 +0000)]
simplify as daniel suggests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82415
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 22:54:26 +0000 (22:54 +0000)]
write rfind in terms of npos as daniel requested
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82414
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 22:46:42 +0000 (22:46 +0000)]
remove a dead method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82413
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 22:45:18 +0000 (22:45 +0000)]
grammaro
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82412
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 22:44:26 +0000 (22:44 +0000)]
Revert r82404, it is causing a bootstrap miscompile. This is very very
scary, as it indicates a lurking bug. yay.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82411
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 22:42:44 +0000 (22:42 +0000)]
rewrite CountNumNewlinesBetween to be in terms of StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82410
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 22:36:11 +0000 (22:36 +0000)]
this was not supposed to be committed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82409
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 22:35:26 +0000 (22:35 +0000)]
implement and document support for CHECK-NOT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82408
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 22:11:44 +0000 (22:11 +0000)]
rewrite FileCheck in terms of StringRef instead of manual pointer pairs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82407
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 21:00:18 +0000 (21:00 +0000)]
improve memdep to eliminate bitcasts (and aliases, and noop geps)
early for the stated reasons: this allows it to find more
equivalences and depend less on code layout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82404
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 20:09:34 +0000 (20:09 +0000)]
Move CoerceAvailableValueToLoadType earlier in GVN.cpp. Hook it up
so that nonlocal and partially redundant loads can use it as well.
The testcase shows examples of craziness this can handle. This triggers
*many* times in 176.gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82403
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 19:31:14 +0000 (19:31 +0000)]
change the interface to CoerceAvailableValueToLoadType to be
more generic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82402
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 20 Sep 2009 19:04:28 +0000 (19:04 +0000)]
Teach 'make check-all' to build the site configuration for clang, if it is in tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82400
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 19:03:47 +0000 (19:03 +0000)]
enhance GVN to forward substitute a stored value to a load
(and load -> load) when the base pointers must alias but when
they are different types. This occurs very very frequently in
176.gcc and other code that uses bitfields a lot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82399
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 17:37:38 +0000 (17:37 +0000)]
update an entry, delete an entry which has been fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82398
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 17:32:21 +0000 (17:32 +0000)]
tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82397
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 20 Sep 2009 09:13:15 +0000 (09:13 +0000)]
--- Reverse-merging r82282 into '.':
U lib/CodeGen/AsmPrinter/DwarfException.cpp
U lib/CodeGen/AsmPrinter/DwarfException.h
--- Reverse-merging r82274 into '.':
U lib/Target/TargetLoweringObjectFile.cpp
G lib/CodeGen/AsmPrinter/DwarfException.cpp
These revisions were breaking everything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82396
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 07:47:59 +0000 (07:47 +0000)]
remove a temporary hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82395
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 07:41:30 +0000 (07:41 +0000)]
rename X86ATTAsmPrinter.cpp -> X86AsmPrinter.cpp likewise the .h file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82394
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 07:39:06 +0000 (07:39 +0000)]
move target registry stuff to X86ATTAsmPrinter.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82393
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 07:37:51 +0000 (07:37 +0000)]
simplify this now that createX86CodePrinterPass is trivial
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82392
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 07:35:34 +0000 (07:35 +0000)]
rename X86ATTAsmPrinter class -> X86AsmPrinter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82391
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 07:32:00 +0000 (07:32 +0000)]
remove the asmstring, it is now dead. Improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82390
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 20 Sep 2009 07:31:25 +0000 (07:31 +0000)]
Peer through zext and sext to eliminate them when it is safe to do so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82389
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 07:28:26 +0000 (07:28 +0000)]
kill off printPICLabel now, it's specialness is handled by
the MachineInstr ->MCInst lowering process, not in the
asmprinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82388
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 07:25:17 +0000 (07:25 +0000)]
delete X86IntelAsmPrinter! Now -x86-asm-syntax just switches
the instruction syntax, not the entire asmprinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82387
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 20 Sep 2009 07:21:39 +0000 (07:21 +0000)]
Fold 'icmp eq (icmp), true' into an xor(icmp).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82386
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 07:17:49 +0000 (07:17 +0000)]
Add an intel syntax MCInstPrinter implementation. You can now
transcode from AT&T to intel syntax with "llvm-mc foo.s -output-asm-variant=1"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82385
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 07:16:54 +0000 (07:16 +0000)]
tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82384
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 20 Sep 2009 07:00:24 +0000 (07:00 +0000)]
Rewrite this check so that it checks what it's supposed to and doesn't use
CHECK-NOT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82383
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 06:58:54 +0000 (06:58 +0000)]
eliminate a use of strtoul.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82382
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 06:45:52 +0000 (06:45 +0000)]
split random COFF asmprinter state out to X86COFFMachineModuleInfo.h.
Make dllexport directives come out in determinstic order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82381
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 20 Sep 2009 06:27:35 +0000 (06:27 +0000)]
Correct the comment; this applies to fcmp too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82380
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 20 Sep 2009 06:26:34 +0000 (06:26 +0000)]
Remove tab, again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82379
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 20 Sep 2009 06:24:51 +0000 (06:24 +0000)]
Teach the constant folder how to not a cmpinst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82378
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 06:21:43 +0000 (06:21 +0000)]
smallvectorize getExtraOptionNames
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82377
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 06:21:20 +0000 (06:21 +0000)]
add a helper method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82376
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 06:18:38 +0000 (06:18 +0000)]
minor cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82375
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 20 Sep 2009 06:17:21 +0000 (06:17 +0000)]
Add 'make check-all', which runs the LLVM tests along with the clang tests if
its in the standard location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82374
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 20 Sep 2009 06:17:12 +0000 (06:17 +0000)]
Follow googletest logic for suppressing warnings in unittests/UnitTestMain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82373
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 05:53:47 +0000 (05:53 +0000)]
strength reduce further StringRef-> const char*, saving another 620 bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82372
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 20 Sep 2009 05:48:50 +0000 (05:48 +0000)]
Try turning icmp(bitcast(x), bitcast(y)) into icmp(bitcast(bitcast(x)), y) in
the hopes that the two bitcasts will merge.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82371
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 05:48:01 +0000 (05:48 +0000)]
switch an std::string to StringRef, shaving 400 bytes off CommandLine.o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82370
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 20 Sep 2009 05:47:45 +0000 (05:47 +0000)]
Remove tabs I added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82369
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 05:37:24 +0000 (05:37 +0000)]
the switch from std::map -> StringMap caused --help output to be in
non-sorted order, restore the sort.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82368
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 05:22:52 +0000 (05:22 +0000)]
eliminate the duplicate detection loop, moving it into the loop that populates the Opts vector in the first place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82367
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 05:18:28 +0000 (05:18 +0000)]
Eliminate a masochistic "algorithm" loop, shrinking CommandLine.o from 71524->70700 bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82366
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 05:15:12 +0000 (05:15 +0000)]
don't use count + insert, just do insert + failure. Also, instead of deleting from
the middle of a vector, swap the last element in and pop_back. Also saves 330 bytes :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82365
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 05:12:14 +0000 (05:12 +0000)]
switch to SmallPtrSet instead of std::set, saving 1K from the
release-asserts .o file (72900->71856).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82364
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 05:06:23 +0000 (05:06 +0000)]
change an std::sort to an array_pod_sort call, shrinking CommandLine.o by 9%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82363
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 05:03:30 +0000 (05:03 +0000)]
Several changes together in a murky mess:
1. Change some "\n" -> '\n'.
2. eliminte some std::string's by using raw_ostream::indent.
3. move a bunch of code out of the main arg parser routine into
a new static HandlePrefixedOrGroupedOption function.
4. Greatly simplify the implementation of getOptionPred, and make
it avoid splitting prefix options at = when that doesn't match
a non-prefix option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82362
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 20 Sep 2009 04:27:06 +0000 (04:27 +0000)]
Clean up the usage of evaluateICmpRelation's return value.
Add another line to the ConstantExprFold test to demonstrate the GEPs may not
wrap around in either the signed or unsigned senses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82361
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 20 Sep 2009 04:03:41 +0000 (04:03 +0000)]
Fix refacto, this code was expecting to stride past the argument prefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82360
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 20 Sep 2009 04:03:34 +0000 (04:03 +0000)]
Strip trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82359
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 20 Sep 2009 04:03:25 +0000 (04:03 +0000)]
A few more tabs -> spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82358
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 20 Sep 2009 03:48:46 +0000 (03:48 +0000)]
Remove dead store by taking a guess at what Chris meant. I wasn't able to
design a testcase that would tickle this behaviour.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82357
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 20 Sep 2009 02:27:06 +0000 (02:27 +0000)]
Still one more thing wrong here...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82356
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 20 Sep 2009 02:20:51 +0000 (02:20 +0000)]
Tabs -> spaces, and remove trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82355
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 20 Sep 2009 02:19:49 +0000 (02:19 +0000)]
Here's fun! It turns out that these filter functions can be internal. If they're
internal, they shouldn't use the indirect pointer stuff. In the case of
throw_rethrow_test, it was marked as 'internal' and calculated its own offset to
its contents.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82354
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 20 Sep 2009 02:11:47 +0000 (02:11 +0000)]
Delete dead code. sext and zext can not turn integers into pointers. Further,
the optimization described in the comment is only valid with target data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82353
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 02:02:24 +0000 (02:02 +0000)]
convert argname to StringRef, simplifying LookupOption.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82352
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 01:53:12 +0000 (01:53 +0000)]
convert 'Value' to StringRef which makes it easier to
maintain the "null is unspecified, empty is empty" semantics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82351
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 01:49:31 +0000 (01:49 +0000)]
Change CommaSeparated processing to do it with StringRef instead of temporary std::strings.
This requires StringRef'izing ProvideOption which I also did.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82350
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 20 Sep 2009 01:35:59 +0000 (01:35 +0000)]
Value* were never meant to be const. Removing constness from the constant
folder removes a lot of const_casting and requires no changes to clang or
llvm-gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82349
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 01:33:46 +0000 (01:33 +0000)]
rewrite ParseCStringVector in terms of stringref.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82348
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 01:22:16 +0000 (01:22 +0000)]
move a couple non-trivial methods out of line, add new
find_first_of/find_first_of methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82347
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 01:11:23 +0000 (01:11 +0000)]
coding style cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82346
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 00:40:49 +0000 (00:40 +0000)]
convert a bunch more stuff to use StringRef. The ArgName arguments are now
stringref because they may not be nul terminated. For options like -Lfoo
this now avoids a O(n) temporary std::strings where N is the length of
the string after -L.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82345
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 00:38:28 +0000 (00:38 +0000)]
add size_t and a version of rfind that allows specification of where
to scan from.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82343
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Sun, 20 Sep 2009 00:36:41 +0000 (00:36 +0000)]
When computing live intervals for earlyclobber operands,
we pushed the beginning of the interval back 1, so the
interval would overlap with inputs that die. We were
also pushing the end of the interval back 1, though,
which means the earlyclobber didn't overlap with other
output operands. Don't do this. PR 4964.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82342
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Sep 2009 00:07:40 +0000 (00:07 +0000)]
avoid a bunch of malloc thrashing for PositinoalVals by eliminating
a std::vector and a bunch of std::string temporaries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82341
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 20 Sep 2009 00:04:02 +0000 (00:04 +0000)]
Teach the constant folder how to handle a few simple i1 cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82340
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Sep 2009 23:59:02 +0000 (23:59 +0000)]
Avoid some temporary strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82339
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Sep 2009 23:58:48 +0000 (23:58 +0000)]
add some more overloads of StringRef::getAsInteger for
common and useful integer types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82338
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Sep 2009 23:57:31 +0000 (23:57 +0000)]
add a simple c_str() method to SmallString.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82337
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 19 Sep 2009 22:02:37 +0000 (22:02 +0000)]
Revert r82274. It's causing failures in the CINT2006 benchmarks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82336
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 19 Sep 2009 20:40:28 +0000 (20:40 +0000)]
Prefer super class constructor to explicit initialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82335
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 19 Sep 2009 20:40:21 +0000 (20:40 +0000)]
Tabs -> spaces (really?)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82334
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 19 Sep 2009 20:40:14 +0000 (20:40 +0000)]
Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82333
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 19 Sep 2009 20:40:05 +0000 (20:40 +0000)]
Strip trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82332
91177308-0d34-0410-b5e6-
96231b3b80d8