Bill Wendling
a042a82408
Add radar number.
...
llvm-svn: 66534
2009-03-10 06:53:54 +00:00
Chris Lattner
1522e2498f
wire up support for emitting "special" values from inline asm
...
format strings with the standard ${:foo} syntax.
llvm-svn: 66527
2009-03-10 05:37:13 +00:00
Dan Gohman
b0d4009ec8
Add more information to the EFLAGS note.
...
llvm-svn: 66515
2009-03-10 00:26:23 +00:00
Stuart Hastings
9895a1c66a
Check for warnings about inappropriate weak_imports.
...
Darwin-specific; marked XFAIL for others.
llvm-svn: 66514
2009-03-10 00:17:39 +00:00
Dan Gohman
d5b35ee215
Add a note about EFLAGS optimization.
...
llvm-svn: 66508
2009-03-09 23:47:02 +00:00
Devang Patel
04852aa933
Ignore debug info while evaluating function.
...
llvm-svn: 66490
2009-03-09 23:04:12 +00:00
Dan Gohman
f12436891e
Don't record the increment instruction; just recompute it from the Phi
...
if needed. This simplifies the code a little, and is needed for an
upcoming refactoring.
llvm-svn: 66479
2009-03-09 22:04:01 +00:00
Chris Lattner
26161cdc6c
Fix PR3724 by searching for the largest free block when
...
allocating memory in the JIT. This is insanely inefficient, but
hey, most people implement their own memory managers anyway.
Patch by Eric Yew!
llvm-svn: 66472
2009-03-09 21:34:10 +00:00
Devang Patel
4a1b0776b3
Remove llvm.dbg.global_variables also.
...
llvm-svn: 66471
2009-03-09 21:32:28 +00:00
Dan Gohman
b855164751
Fix a few more places where induction variable types were used
...
where memory access types are needed.
llvm-svn: 66470
2009-03-09 21:22:12 +00:00
Dan Gohman
5a4e31666d
Use ReplacedTy instead of recomputing the same value.
...
llvm-svn: 66469
2009-03-09 21:19:58 +00:00
Dan Gohman
34e52ddb7d
Use LoopInfo's getLoopLatch() instead of doing what it does manualy.
...
llvm-svn: 66467
2009-03-09 21:14:16 +00:00
Dan Gohman
70cc9875d8
Don't use an induction variable type as a memory access type.
...
Use VoidTy instead, to be properly conservative.
llvm-svn: 66463
2009-03-09 21:04:19 +00:00
Dan Gohman
917ffe4592
Factor out the code that determines the memory access type
...
of an instruction into a helper function.
llvm-svn: 66460
2009-03-09 21:01:17 +00:00
Chris Lattner
dd282825a8
Clarify wording, patch by Stefanus Du Toit!
...
llvm-svn: 66458
2009-03-09 20:55:18 +00:00
Devang Patel
66f84e7a42
Add helper pass to remove llvm.dbg.declare intrinsics.
...
llvm-svn: 66454
2009-03-09 20:49:37 +00:00
Dan Gohman
e201f8ff1d
Move the sorting of the StrideOrder array earlier so that it doesn't
...
have to be done twice.
llvm-svn: 66449
2009-03-09 20:46:50 +00:00
Dan Gohman
b5001909b0
Delete the isOnlyStride argument, which is unused.
...
llvm-svn: 66446
2009-03-09 20:41:15 +00:00
Dan Gohman
85875f7120
Tidy some LSR debug output: announce the loop it's about to process
...
before it does any processing.
llvm-svn: 66443
2009-03-09 20:34:59 +00:00
Evan Cheng
0ee0da841d
ARM target now also recognize triplets like thumbv6-apple-darwin and set thumb mode and arch subversion. Eventually thumb triplets will go way and replaced with function notes.
...
llvm-svn: 66435
2009-03-09 20:25:39 +00:00
Chris Lattner
4249b9a698
Fix PR3763 by using proper APInt methods instead of uint64_t's.
...
llvm-svn: 66434
2009-03-09 20:22:18 +00:00
Gabor Greif
c0bee2986c
make the Op<N> methods protected, how it was intended to be
...
llvm-svn: 66430
2009-03-09 19:57:49 +00:00
Evan Cheng
ce5dfb692a
ARM isLegalAddressImmediate should check if type is a simple type now that optimizer can create values of funky scalar types.
...
llvm-svn: 66429
2009-03-09 19:15:00 +00:00
Evan Cheng
fb8ded911e
Yet another case where the spiller marked two uses of the same register on the same instruction as kill. This fixes PR3706.
...
llvm-svn: 66428
2009-03-09 19:00:05 +00:00
Evan Cheng
3807bb77fa
Re-apply 66315, but restrict it to Darwin only.
...
llvm-svn: 66427
2009-03-09 18:28:37 +00:00
Bill Wendling
c08580af44
Revert r66415. It's causing failures during bootstrap builds:
...
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter > for instructions.
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c: In function '__muldi3':
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c:567: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter > for instructions.
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c: In function '__lshrdi3':
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c:421: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter > for instructions.
make[5]: *** [libgcc/./_lshrdi3.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: *** [libgcc/./_muldi3.o] Error 1
make[5]: *** [libgcc/./_negdi2.o] Error 1
--- Reverse-merging (from foreign repository) r66415 into '.':
U include/llvm/BasicBlock.h
U include/llvm/ADT/ilist_node.h
U include/llvm/CodeGen/SelectionDAG.h
U include/llvm/CodeGen/MachineFunction.h
U include/llvm/CodeGen/MachineBasicBlock.h
U include/llvm/Function.h
llvm-svn: 66426
2009-03-09 18:01:33 +00:00
Bob Wilson
4718296d64
Add a constructor for BuildVectorSDNode and revert the temporary workaround
...
from 66280. I was unable to verify this with gcc-3.4.6, but with gcc-3.3 it
avoids the "base class with only non-default constructor in class without
a constructor" warning. Apparently that warning was promoted to an error
in gcc-3.4.
llvm-svn: 66424
2009-03-09 17:07:15 +00:00
Duncan Sands
5cbd3d9c52
This debug info special case should no longer
...
be needed now that these intrinsics are marked
as not accessing memory.
llvm-svn: 66420
2009-03-09 11:57:08 +00:00
Chris Lattner
126dab2f76
just remove the use_empty() check entirely, the only reason it
...
existed was for llvm-gcc 3.4 (which used the __main hack) which
is really really long dead.
llvm-svn: 66417
2009-03-09 08:18:48 +00:00
Gabor Greif
f183a3e95b
in builds without asserts we do not need to allocate the Next pointer in "ghostly" sentinels
...
llvm-svn: 66415
2009-03-09 07:09:01 +00:00
Nick Lewycky
714976b70f
Regenerate.
...
llvm-svn: 66407
2009-03-09 06:16:46 +00:00
Nick Lewycky
b2f34f6211
Remove configurey-fu to autodetect hash_map and hash_set now that they are
...
no longer used in LLVM.
llvm-svn: 66406
2009-03-09 06:16:26 +00:00
Chris Lattner
317293b504
Make the code generator rip of dead constant expr uses before deciding
...
whether a global is dead or not. This should fix PR3749 - linker adds
spurious use to appending globals. I can't reasonably add a testcase
for this, because the bc writer/reader strip dead constant users.
llvm-svn: 66404
2009-03-09 05:52:15 +00:00
Chris Lattner
6f884e07c5
make GlobalValue::removeDeadConstantUsers() const.
...
llvm-svn: 66403
2009-03-09 05:50:45 +00:00
Chris Lattner
822015d96e
testcase for PR3744
...
llvm-svn: 66401
2009-03-09 05:44:59 +00:00
Chris Lattner
4ce03e66a1
don't allow hash_map or hash_set.
...
llvm-svn: 66400
2009-03-09 05:20:45 +00:00
Owen Anderson
f9a9cf96a1
Ignore debug intrinsics when computing dependences.
...
llvm-svn: 66399
2009-03-09 05:12:38 +00:00
Chris Lattner
0eab5ecb71
reimplement AliasSetTracker in terms of DenseMap instead of hash_map,
...
hopefully no functionality change.
llvm-svn: 66398
2009-03-09 05:11:09 +00:00
Chris Lattner
7c2ab26007
add a #include to improve portability to windows, as requested by
...
someone on llvmdev.
llvm-svn: 66397
2009-03-09 05:10:08 +00:00
Bill Wendling
c6869f4695
Pass in a std::string when getting the names of debugging things. This cuts down
...
on the number of times a std::string is created and copied.
llvm-svn: 66396
2009-03-09 05:04:40 +00:00
Chris Lattner
4a48815bd9
fix Analysis/BasicAA/2004-12-08-BasicAACrash.ll by allowing opaque types.
...
llvm-svn: 66395
2009-03-09 04:56:22 +00:00
Chris Lattner
f880ca2a31
Fix two classes of bugs. First:
...
validate an invariant so that the asmparser rejects a bad construct
instead of the verifier. Before:
llvm-as: assembly parsed, but does not verify as correct!
Invalid struct return type!
i64 (%struct.Type*, %struct.Type*)* @foo
after:
llvm-as: t.ll:5:8: functions with 'sret' argument must return void
define i64 @foo(%struct.Type* noalias nocapture sret %agg.result, %struct.Type* nocapture byval %t) nounwind {
^
Second, check that void is only used where allowed (in function return types) not in
arbitrary places, fixing PR3747 - Crash in llvm-as with void field in struct. We
now reject that example with:
$ llvm-as t.ll
llvm-as: t.ll:1:12: struct element can not have void type
%x = type {void}
^
llvm-svn: 66394
2009-03-09 04:49:14 +00:00
Chris Lattner
6090a42fe5
Fix PR3746 - Crash in isel with GEP of function pointer
...
by checking that the top-level type of a gep is sized. This
causes us to reject the example with:
llvm-as: t2.ll:2:16: invalid getelementptr indices
getelementptr i32()* null, i32 1
^
llvm-svn: 66393
2009-03-09 04:46:40 +00:00
Chris Lattner
3b935fbcf2
Fix PR3743 - -mmacosx-version-min inappropriate for Mac OS X 10.4.11,
...
by stripping off any versions past the "10.4".
llvm-svn: 66392
2009-03-09 04:45:03 +00:00
Chris Lattner
bb1ba7b7d3
add some explicit llvm:: qualifiers to the unix side, fix problems on the windows side.
...
llvm-svn: 66386
2009-03-08 19:13:45 +00:00
Nick Lewycky
dc9642feb1
Keep calling-convention and tail-call bit when creating new invoke or call.
...
llvm-svn: 66384
2009-03-08 19:02:17 +00:00
Chris Lattner
d5ac9d87b4
do not export all the X86FastISel symbols, ever.
...
llvm-svn: 66382
2009-03-08 18:44:31 +00:00
Nick Lewycky
9ec96d19e3
Fix comments, pointed out by Duncan Sands.
...
llvm-svn: 66381
2009-03-08 17:08:09 +00:00
Duncan Sands
d725c99199
Apply ODR linkage changes accidentally dropped during
...
final cleaning. This fixes a bunch of testsuite failures.
llvm-svn: 66380
2009-03-08 13:35:23 +00:00
Sebastian Redl
4c5c4a5ac3
Test commit
...
llvm-svn: 66378
2009-03-08 11:43:20 +00:00
Nick Lewycky
fbed86a865
Mark function returns as noalias.
...
llvm-svn: 66369
2009-03-08 06:20:47 +00:00
Chris Lattner
21a84f3054
teach SROA to handle promoting vector allocas with a memset into them into
...
a vector type instead of into an integer type.
llvm-svn: 66368
2009-03-08 04:17:04 +00:00
Chris Lattner
e408601cec
fix typo
...
llvm-svn: 66367
2009-03-08 04:06:26 +00:00
Chris Lattner
c009757761
Enhance SROA to "promote to scalar" allocas which are
...
memcpy/memmove'd into or out of. This fixes a serious
perf issue that Nate ran into.
llvm-svn: 66366
2009-03-08 04:04:21 +00:00
Evan Cheng
ec415efb44
Recognize triplets starting with armv5-, armv6- etc. And set the ARM arch version accordingly.
...
llvm-svn: 66365
2009-03-08 04:02:49 +00:00
Chris Lattner
dc35e5b43a
change the MemIntrinsic get/setAlignment method to take an unsigned
...
instead of a Constant*, which is what the clients of it really want.
llvm-svn: 66364
2009-03-08 03:59:00 +00:00
Evan Cheng
de22116f39
If a MI uses the same register more than once, only mark one of them as 'kill'.
...
llvm-svn: 66363
2009-03-08 03:58:35 +00:00
Chris Lattner
fee0a55c84
use MemTransferInst.
...
llvm-svn: 66362
2009-03-08 03:37:35 +00:00
Chris Lattner
334268a211
Introduce a new MemTransferInst pseudo class, which is a common
...
parent between MemCpyInst and MemMoveInst, simplify some code to
use it.
llvm-svn: 66361
2009-03-08 03:37:16 +00:00
Chris Lattner
393ac62837
add a note.
...
llvm-svn: 66360
2009-03-08 03:04:26 +00:00
Chris Lattner
cfd1f7aa9f
add a note.
...
llvm-svn: 66359
2009-03-08 01:54:43 +00:00
Chris Lattner
ab5a443144
implement an optimization to codegen c ? 1.0 : 2.0 as load { 2.0, 1.0 } + c*4.
...
For 2009-03-07-FPConstSelect.ll we now produce:
_f:
xorl %eax, %eax
testl %edi, %edi
movl $4, %ecx
cmovne %rax, %rcx
leaq LCPI1_0(%rip), %rax
movss (%rcx,%rax), %xmm0
ret
previously we produced:
_f:
subl $4, %esp
cmpl $0, 8(%esp)
movss LCPI1_0, %xmm0
je LBB1_2 ## entry
LBB1_1: ## entry
movss LCPI1_1, %xmm0
LBB1_2: ## entry
movss %xmm0, (%esp)
flds (%esp)
addl $4, %esp
ret
on PPC the code also improves to:
_f:
cntlzw r2, r3
srwi r2, r2, 5
li r3, lo16(LCPI1_0)
slwi r2, r2, 2
addis r3, r3, ha16(LCPI1_0)
lfsx f1, r3, r2
blr
from:
_f:
li r2, lo16(LCPI1_1)
cmplwi cr0, r3, 0
addis r2, r2, ha16(LCPI1_1)
beq cr0, LBB1_2 ; entry
LBB1_1: ; entry
li r2, lo16(LCPI1_0)
addis r2, r2, ha16(LCPI1_0)
LBB1_2: ; entry
lfs f1, 0(r2)
blr
This also improves the existing pic-cpool case from:
foo:
subl $12, %esp
call .Lllvm$1.$piclabel
.Lllvm$1.$piclabel:
popl %eax
addl $_GLOBAL_OFFSET_TABLE_ + [.-.Lllvm$1.$piclabel], %eax
cmpl $0, 16(%esp)
movsd .LCPI1_0@GOTOFF(%eax), %xmm0
je .LBB1_2 # entry
.LBB1_1: # entry
movsd .LCPI1_1@GOTOFF(%eax), %xmm0
.LBB1_2: # entry
movsd %xmm0, (%esp)
fldl (%esp)
addl $12, %esp
ret
to:
foo:
call .Lllvm$1.$piclabel
.Lllvm$1.$piclabel:
popl %eax
addl $_GLOBAL_OFFSET_TABLE_ + [.-.Lllvm$1.$piclabel], %eax
xorl %ecx, %ecx
cmpl $0, 4(%esp)
movl $8, %edx
cmovne %ecx, %edx
fldl .LCPI1_0@GOTOFF(%eax,%edx)
ret
This triggers a few dozen times in spec FP 2000.
llvm-svn: 66358
2009-03-08 01:51:30 +00:00
Chris Lattner
21cf4bf235
random cleanups.
...
llvm-svn: 66357
2009-03-08 01:47:41 +00:00
Nick Lewycky
add31939ed
Fix misaligned whitespace. No functionality change.
...
llvm-svn: 66355
2009-03-08 00:57:09 +00:00
Chris Lattner
e313283199
fix a serious pessimization that Tron on IRC pointed out where we would
...
"boolify" pointers, generating really awful code because getting the pointer
value requires a load itself. Before:
_foo:
movb $1, _X.b
ret
_get:
xorl %ecx, %ecx
movb _X.b, %al
testb %al, %al
movl $_Y, %eax
cmove %ecx, %eax
ret
With the xform disabled:
_foo:
movl $_Y, _X
ret
_get:
movl _X, %eax
ret
llvm-svn: 66351
2009-03-07 23:32:02 +00:00
Nick Lewycky
f653c2e18e
Revert r66315. Fix the build on mixed 64/32 Linux systems.
...
llvm-svn: 66350
2009-03-07 22:17:05 +00:00
Mikhail Glushenkov
d18088a7b1
Remove some duplication.
...
llvm-svn: 66347
2009-03-07 20:18:46 +00:00
Duncan Sands
12da8ce3d2
Introduce new linkage types linkonce_odr, weak_odr, common_odr
...
and extern_weak_odr. These are the same as the non-odr versions,
except that they indicate that the global will only be overridden
by an *equivalent* global. In C, a function with weak linkage can
be overridden by a function which behaves completely differently.
This means that IP passes have to skip weak functions, since any
deductions made from the function definition might be wrong, since
the definition could be replaced by something completely different
at link time. This is not allowed in C++, thanks to the ODR
(One-Definition-Rule): if a function is replaced by another at
link-time, then the new function must be the same as the original
function. If a language knows that a function or other global can
only be overridden by an equivalent global, it can give it the
weak_odr linkage type, and the optimizers will understand that it
is alright to make deductions based on the function body. The
code generators on the other hand map weak and weak_odr linkage
to the same thing.
llvm-svn: 66339
2009-03-07 15:45:40 +00:00
Gabor Greif
51bbcf834c
simplify the way how traits get hold of the symbol table
...
llvm-svn: 66336
2009-03-07 12:33:24 +00:00
Gabor Greif
6e1ca84d2c
further simplifications arising from peruse of the more declarative interface
...
llvm-svn: 66333
2009-03-07 10:49:57 +00:00
Gabor Greif
5cd1b25822
Remove the burden of dealing with list offsets
...
from SymbolTableListTraits' clients, and
intead request a nice declarative interface.
Cleans up an IMHO ugly wart.
llvm-svn: 66331
2009-03-07 10:00:35 +00:00
Chris Lattner
6acb4d6f7e
When a crash signal is delivered do two things: remove all of our
...
signal handlers to prevent reentrance on unrelated things (a sigabort
where the handle bus errors) also, clear the signal mask so that the
signal doesn't infinitely reissue. This fixes rdar://6654827 -
Crash causes clang to loop
llvm-svn: 66330
2009-03-07 08:15:47 +00:00
Nate Begeman
52b696c7ad
Finish cross-process JIT work, and clean up previous work.
...
1. When the JIT is asked to remove a function, updating it's
mapping to 0, we invalidate any function stubs used only
by that function. Now, also invalidate the JIT's mapping
from the GV the stub pointed to, to the address of the GV.
2. When dlsym stubs for cross-process JIT are enabled, do not
abort just because a named function cannot be found in the
JIT's process.
3. Fix various assumptions about when it is ok to use the lazy
resolver when non-lazy JITing is enabled.
llvm-svn: 66324
2009-03-07 06:41:19 +00:00
Dan Gohman
ff659b5b86
Arithmetic instructions don't set EFLAGS bits OF and CF bits
...
the same say the "test" instruction does in overflow cases,
so eliminating the test is only safe when those bits aren't
needed, as is the case for COND_E and COND_NE, or if it
can be proven that no overflow will occur. For now, just
restrict the optimization to COND_E and COND_NE and don't
do any overflow analysis.
llvm-svn: 66318
2009-03-07 01:58:32 +00:00
Evan Cheng
9153f08c74
If ARCH is x86_64, pass -m64 to the host compiler. -m32 for i386. This makes sure the JIT work correctly.
...
llvm-svn: 66315
2009-03-07 01:40:17 +00:00
Daniel Dunbar
d39e0974fe
Add IRBuilder::CreateConstGEP{1, 2}_{32, 64}.
...
- Names are lame, but it seems better to be explicit.
llvm-svn: 66295
2009-03-06 22:26:07 +00:00
Daniel Dunbar
3b3c3f02cc
Rename my makefile debugging rule to prevent accidental collisions.
...
llvm-svn: 66294
2009-03-06 22:23:25 +00:00
Daniel Dunbar
dcf8d3c9eb
Add Module::getNamedValue; use to normalize access to Module symbol
...
table.
- No functionality change.
llvm-svn: 66289
2009-03-06 22:04:43 +00:00
Dale Johannesen
6e447e08ee
Fix another case where debug info interferes with
...
an optimization.
llvm-svn: 66288
2009-03-06 21:08:33 +00:00
Tanya Lattner
8498d2dd2b
Add default constructor to SDNode to make gcc 3.4.6 happy.
...
llvm-svn: 66280
2009-03-06 18:17:45 +00:00
Dan Gohman
ec5f2b5e05
Use c_str() to force the string to be nul-terminated.
...
llvm-svn: 66279
2009-03-06 18:13:15 +00:00
Mikhail Glushenkov
211f3c0f97
Add a comment.
...
llvm-svn: 66278
2009-03-06 17:59:58 +00:00
Chris Lattner
040ce02174
some nits noticed by Duncan
...
llvm-svn: 66274
2009-03-06 17:05:04 +00:00
Chris Lattner
a59518276e
fix header comment and include guard.
...
llvm-svn: 66273
2009-03-06 16:54:19 +00:00
Chris Lattner
e48f897ca7
add a bunch more passes to the C bindings (PR3734), patch by
...
Lennart Augustsson!
llvm-svn: 66272
2009-03-06 16:52:18 +00:00
Mikhail Glushenkov
0658cac532
Trailing whitespace.
...
llvm-svn: 66269
2009-03-06 12:25:56 +00:00
Mikhail Glushenkov
6a64f907c6
Trailing whitespace.
...
llvm-svn: 66268
2009-03-06 12:21:40 +00:00
Duncan Sands
ed7228319a
While thinking about the one-definition-rule and trying
...
to find a tiny mouse hole to squeeze through, it struck
me that globals without a name can be considered internal
since they can't be referenced from outside the current
module. This patch makes GlobalOpt give them internal
linkage. Also done for aliases even though they always
have names, since in my opinion anonymous aliases should
be allowed for consistency with global variables and
functions. So if that happens one day, this code is ready!
llvm-svn: 66267
2009-03-06 10:21:56 +00:00
Chris Lattner
e41a434f89
on apple systems, integrate nicely with crash reporter.
...
llvm-svn: 66264
2009-03-06 07:19:54 +00:00
Devang Patel
25b625165f
While converting an aggregate to scalare, ignore and remove aggregate's debug info.
...
llvm-svn: 66262
2009-03-06 07:03:54 +00:00
Chris Lattner
4c1e9541d3
Sprinkle some PrettyStackEntry magic into the passmanager. With this, we now
...
get nice and happy stack traces when we crash in an optimizer or codegen. For
example, an abort put in UnswitchLoops now looks like this:
Stack dump:
0. Program arguments: clang pr3399.c -S -O3
1. <eof> parser at end of file
2. per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module 'pr3399.c'.
4. Running pass 'Loop Pass Manager' on function '@foo'
5. Running pass 'Unswitch loops' on basic block '%for.inc'
Abort
llvm-svn: 66260
2009-03-06 06:45:05 +00:00
Zhou Sheng
c8e5085cd3
Remove this as dbginfo intrinsics has been defined as
...
IntrNoMem.
llvm-svn: 66256
2009-03-06 06:05:01 +00:00
Devang Patel
5aed7765b8
While hoisting instruction to speculatively execute simple bb, ignore dbg intrinsics.
...
llvm-svn: 66255
2009-03-06 06:00:17 +00:00
Chris Lattner
609873608e
various cosmetic cleanups.
...
llvm-svn: 66254
2009-03-06 05:53:14 +00:00
Chris Lattner
e6d1e8d0cc
this wasn't intended to go in.
...
llvm-svn: 66252
2009-03-06 05:42:30 +00:00
Chris Lattner
e3fc2d13be
Change various llvm utilities to use PrettyStackTraceProgram in
...
their main routines. This makes the tools print their argc/argv
commands if they crash.
llvm-svn: 66248
2009-03-06 05:34:10 +00:00
Devang Patel
bab43b4c91
Do not count DbgInfoIntrinsic while estimating loop header size.
...
llvm-svn: 66245
2009-03-06 03:51:30 +00:00
Devang Patel
e8c6d3102d
Skip DbgInfoIntrinsic.
...
llvm-svn: 66244
2009-03-06 02:59:27 +00:00
Gordon Henriksen
1424861a62
Committing unsaved changes that should've been with r66237.
...
llvm-svn: 66242
2009-03-06 02:42:47 +00:00
Dan Gohman
15af5524a4
Fix ScheduleDAGRRList::CopyAndMoveSuccessors' handling of nodes
...
with multiple chain operands. This can occur when the scheduler
has added chain operands to a node that already has a chain
operand, in order to handle physical register dependencies.
This fixes an llvm-gcc bootstrap failure on x86-64 introduced
in r66058.
llvm-svn: 66240
2009-03-06 02:23:01 +00:00
Dan Gohman
bcad718f73
Use CloneModule's ValueMap to avoid needing to look up
...
functions by name. This fixes PR718.
llvm-svn: 66239
2009-03-06 02:16:23 +00:00
Gordon Henriksen
3519d5d828
Incorporate feedback to improve GarbageCollection.html.
...
llvm-svn: 66237
2009-03-06 01:57:32 +00:00
Dale Johannesen
fb1caf3e1f
Don't assign rank numbers to debug intrinsic "calls".
...
This is needed so debug info doesn't change codegen.
llvm-svn: 66235
2009-03-06 01:41:59 +00:00
Bill Wendling
6d8472b9cc
When we split a basic block, there's a default branch to the newly created BB.
...
Delete this default branch, because we're going to generate our own.
llvm-svn: 66234
2009-03-06 01:41:15 +00:00
Devang Patel
fc507a1f9c
Revert 66224.
...
llvm-svn: 66233
2009-03-06 01:39:36 +00:00
Devang Patel
d926aaa28f
Revert rev. 66167.
...
We are still not out of woods yet.
llvm-svn: 66232
2009-03-06 01:37:41 +00:00
Oscar Fuentes
afbe97542f
CMake: auto-discover project files under the projects/ subdirectory.
...
Patch by Viktar Zviarovich!
llvm-svn: 66230
2009-03-06 01:16:52 +00:00
Gabor Greif
b3805878d1
do not close friendship with every odd class
...
llvm-svn: 66229
2009-03-06 01:09:27 +00:00
Evan Cheng
5fd4fc76bf
SRThreshold is meant to be inclusive.
...
llvm-svn: 66227
2009-03-06 00:56:43 +00:00
Dale Johannesen
073ab5acab
Tweak the check for promotable alloca's to handle
...
debug intrinsics correctly.
llvm-svn: 66225
2009-03-06 00:42:50 +00:00
Devang Patel
ab16577ade
Do not let debug info prevert globalopt from shriking a global vars to boolean.
...
llvm-svn: 66224
2009-03-06 00:21:00 +00:00
Devang Patel
0c970f94e9
Add "check/remove dbg var" helper routines.
...
llvm-svn: 66223
2009-03-06 00:19:37 +00:00
Bob Wilson
8932717421
Fix a parallel make race condition by swapping the order of -I directories.
...
The .cmi files are generated in $(ObjDir) and then copied to $(OcamlDir).
The ocamldep output references the .cmi files in $(ObjDir), so make kicks
off a dependent compile as soon as the local copy is generated. If the
copy to $(OcamlDir) is not complete at that point, the compiler will read
the partially copied file and complain about a "Corrupted compiled
interface". Searching $(ObjDir) first avoids this.
llvm-svn: 66217
2009-03-06 00:00:58 +00:00
Dan Gohman
4f42ac8400
Fix a bugpoint bug on anonymous functions. Instead of looking up
...
functions in the new module by name, use the ValueMap provided by
CloneModule to do the lookups.
llvm-svn: 66216
2009-03-05 23:20:46 +00:00
Dan Gohman
c719d73eec
Don't use plain INC32 and DEC32 on x86-64; it needs
...
INC64_32r and INC64_16r, because these instructions are encoded
differently on x86-64. This fixes JIT regressions on x86-64 in
kimwitu++ and others.
llvm-svn: 66207
2009-03-05 21:32:23 +00:00
Dan Gohman
e014b193c9
When creating X86ISD::INC and X86ISD::DEC nodes, only add one operand.
...
The extra operand didn't appear to cause any trouble, but it was
erroneous regardless.
llvm-svn: 66206
2009-03-05 21:29:28 +00:00
Dan Gohman
2c2f192c74
Fix the "test" optimization to recognize "dec" as an add of
...
negative one, as subtracts of immediates are canonicalized
to adds.
llvm-svn: 66180
2009-03-05 19:32:48 +00:00
Dan Gohman
14cc4a458e
Make this test more thorough. Not only should there be no %esi,
...
there should be no spilling of anything.
llvm-svn: 66179
2009-03-05 19:31:32 +00:00
Chris Lattner
bbbbbf30bd
move some code to gracefully handle the case when a handler crashes.
...
llvm-svn: 66171
2009-03-05 18:22:14 +00:00
Devang Patel
709d6ac46d
GlobalOpt only process non constant local GVs while optimizing global vars.
...
If non constant local GV named A is used by a constant local GV named B (e.g. llvm.dbg.variable) and B is not used by anyone else then eliminate A as well as B.
In other words, debug info should not interfere in removal of unused GV.
--This life, and those below, will be ignored--
M test/Transforms/GlobalOpt/2009-03-03-dbg.ll
M lib/Transforms/IPO/GlobalOpt.cpp
llvm-svn: 66167
2009-03-05 18:12:02 +00:00
Duncan Sands
96f52eb13f
Add missing file.
...
llvm-svn: 66160
2009-03-05 09:19:13 +00:00
Owen Anderson
380b3838f6
(Hopefully) silence a warning.
...
llvm-svn: 66158
2009-03-05 08:23:20 +00:00
Nick Lewycky
c540cc6591
Regenerate.
...
llvm-svn: 66157
2009-03-05 08:20:44 +00:00
Nick Lewycky
16aac9994b
Autodetect the availability of -export-dynamic in the linker.
...
llvm-svn: 66156
2009-03-05 08:20:21 +00:00
Owen Anderson
ad503987a8
Be more careful about choosing restore points when doing restore folding. This fixes some subtle miscompilations.
...
llvm-svn: 66147
2009-03-05 07:19:18 +00:00
Chris Lattner
8d0fe8cd90
Daniel wanted the stack printed upside down. Perhaps he
...
feels a kinship to machine stacks that grow down. Now we get
stuff like this:
Stack dump:
0. Program arguments: clang clang_crash_Iw2Osj.mi
1. /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/xmmintrin.h:624:1: parsing function body '_mm_cvtpi16_ps'
2. /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/xmmintrin.h:624:1: in compound statement ('{}')
Abort
llvm-svn: 66145
2009-03-05 07:03:49 +00:00
Chris Lattner
2674eb4bd1
indicate what the program args line is.
...
llvm-svn: 66144
2009-03-05 06:51:42 +00:00
Chris Lattner
0c33d436b3
switch this message back to only being in -debug mode.
...
llvm-svn: 66143
2009-03-05 06:48:16 +00:00
Nate Begeman
359df7420f
When allocating stubs, keep track of which Functions are referencing the stub.
...
This invalidates the stubs in the resolver map when they are no longer referenced,
and should the JIT memory manager ever pick up a deallocateStub interface, the
JIT could reclaim the memory for unused stubs as well.
llvm-svn: 66141
2009-03-05 06:34:37 +00:00
Evan Cheng
b7922dee15
Do not split edges to EH landing pads. It will cause code size explosion.
...
llvm-svn: 66140
2009-03-05 06:31:26 +00:00
Evan Cheng
f0bfc6a675
Fix how livein live intervals are handled. Previously it could end at MBB start. Sorry, no small test case possible.
...
llvm-svn: 66129
2009-03-05 03:34:26 +00:00
Dale Johannesen
78ab338024
Fix another case where debug info was affecting
...
codegen. I convinced myself it was OK to skip all
pointer bitcasts here too.
llvm-svn: 66122
2009-03-05 02:06:48 +00:00
Zhou Sheng
abe4192442
Ignore the debug info intrinsics when looking for dependency through basic block.
...
llvm-svn: 66119
2009-03-05 01:45:43 +00:00
Bill Wendling
0bf1ded7bd
Add comment to emphasize that the while body is empty.
...
llvm-svn: 66115
2009-03-05 01:08:35 +00:00
Dale Johannesen
ad6b47377f
Fix another case where a dbg.declare meant something
...
had 2 uses instead of 1.
llvm-svn: 66112
2009-03-05 00:39:02 +00:00
Bill Wendling
19ce8619da
Should have XFAILed this test.
...
llvm-svn: 66086
2009-03-04 22:29:34 +00:00
Bill Wendling
803da0db79
Temporarily revert r65994. It was causing rdar://6646455.
...
llvm-svn: 66083
2009-03-04 22:02:09 +00:00
Gabor Greif
ebd4998c1f
ooops, forgot to include the pointless-write eliminator in my previous checkin
...
llvm-svn: 66081
2009-03-04 21:54:31 +00:00
Dale Johannesen
a31552c151
Add some cautionary comments.
...
llvm-svn: 66080
2009-03-04 21:53:29 +00:00
Chris Lattner
68061d5995
add some helper classes for building light-weight symbolic stack traces
...
that get printed when a program crashes. This is the first step of many.
llvm-svn: 66076
2009-03-04 21:40:23 +00:00
Dale Johannesen
df4226c0e2
Re-commit 65975 and a fix for the problem that
...
was causing llvm-gcc to fail to build. I've
verified it bootstraps now; good enough for me.
llvm-svn: 66073
2009-03-04 21:24:04 +00:00
Chris Lattner
4fdd042d9e
Add a new 'AddSignalHandler' function to Signals.h that allows
...
arbitrary functions to be run when a crash happens. Delete
RemoveDirectoryOnSignal as it is dead and has never had clients.
Change PrintStackTraceOnErrorSignal to be implemented in terms of
AddSignalHandler.
I updated the Win32 versions of these APIs, but can't test them.
If there are any problems, I'd be happy to fix them as well.
llvm-svn: 66072
2009-03-04 21:21:36 +00:00
Dan Gohman
66476b582d
Fix this comment.
...
llvm-svn: 66065
2009-03-04 20:50:23 +00:00
Dan Gohman
ae0035ee15
Add an assertion for a condition that's always true, and not
...
immediately obvious.
llvm-svn: 66062
2009-03-04 20:49:01 +00:00
Gabor Greif
de2fb05246
Give sentinel traits the right to determine the policy where the sentinel is kept.
...
This should result in less indirect memory accesses, less dead writes and tighter code.
llvm-svn: 66061
2009-03-04 20:36:44 +00:00
Dan Gohman
55d7b2ac4f
Re-apply 66008, now that the unfoldMemoryOperand bug is fixed.
...
llvm-svn: 66058
2009-03-04 19:44:21 +00:00
Dan Gohman
f8920d0c75
Correct this comment.
...
llvm-svn: 66057
2009-03-04 19:24:25 +00:00
Dan Gohman
cc329b567d
When using MachineInstr operand indices on SDNodes, the number
...
of MachineInstr def operands must be subtracted out. This bug
was uncovered by the recent x86 EFLAGS optimization. Before
that, the only instructions that ever needed unfolding were
things like CMP32rm, where NumDefs is zero.
llvm-svn: 66056
2009-03-04 19:23:38 +00:00
Chris Lattner
a41bb40458
complete comment.
...
llvm-svn: 66055
2009-03-04 19:23:25 +00:00
Chris Lattner
b5b0c87be6
this wasn't intended to be committed.
...
llvm-svn: 66054
2009-03-04 19:22:30 +00:00
Chris Lattner
5c204c92a4
Fix PR3720 by properly propagating alignment information from memcpy/memmove
...
onto element accesses.
llvm-svn: 66053
2009-03-04 19:20:50 +00:00
Nate Begeman
920438ef1d
Fix a thinko in the JIT where the address of a GV was only recorded in the map
...
on failure to resolve it.
Do not abort on failure to resolve an external symbol when using dlsym stubs,
since the symbol may not be in the JIT's address space. Just use 0.
Allow dlsym stubs to differentiate between GlobalVars and Functions.
llvm-svn: 66050
2009-03-04 19:10:38 +00:00
Bob Wilson
5b15d01ff3
Fix BuildVectorSDNode::isConstantSplat to handle one-element vectors.
...
It is an error to call APInt::zext with a size that is equal to the value's
current size, so use zextOrTrunc instead.
llvm-svn: 66039
2009-03-04 17:47:01 +00:00
Mike Stump
436f0ef9ff
.emacs file bits for automatically setting the llvm.org coding style. Thanks Anton.
...
llvm-svn: 66032
2009-03-04 14:14:37 +00:00
Owen Anderson
0dedc114de
Add a restore folder, which shaves a dozen or so machineinstrs off oggenc. Update a testcase to check this.
...
llvm-svn: 66029
2009-03-04 08:52:31 +00:00
Gabor Greif
a954a99c40
"Ghostify" embedded sentinels. This is a real win in all cases
...
because less bytes are allocated and subobject construction is gone.
For reference how it works, see BasicBlock.h.
Btw. it is very assuring to see that somebody has invented
this ilist-embedded sentinel technique before me :-)
llvm-svn: 66026
2009-03-04 06:57:48 +00:00
Evan Cheng
9edd616b59
Fix PR3666: isel calls to constant addresses.
...
llvm-svn: 66024
2009-03-04 06:48:53 +00:00
Eli Friedman
7604d37723
PR3686: make the legalizer handle bitcast from i80 to x86 long double.
...
llvm-svn: 66021
2009-03-04 06:23:34 +00:00
Dan Gohman
6728f892be
Revert r66004 for now; it's causing a variety of test failures.
...
llvm-svn: 66008
2009-03-04 03:54:19 +00:00
Evan Cheng
e08f4cb9a1
Rename test.
...
llvm-svn: 66006
2009-03-04 02:47:25 +00:00
Dan Gohman
fe8d71f42a
Teach the x86 backend to eliminate "test" instructions by using the EFLAGS
...
result from add, sub, inc, and dec instructions in simple cases.
llvm-svn: 66004
2009-03-04 02:33:24 +00:00
Dale Johannesen
845e582cbe
Revert unintended commmit.
...
llvm-svn: 66001
2009-03-04 02:09:48 +00:00
Dale Johannesen
d71c20081c
Skip ptr-to-ptr bitcasts when counting in another case.
...
llvm-svn: 66000
2009-03-04 02:06:53 +00:00
Dale Johannesen
c8b5a6ef7d
Always skip ptr-to-ptr bitcasts when counting,
...
per Chris' suggestion. Slightly faster.
llvm-svn: 65999
2009-03-04 01:53:05 +00:00
Evan Cheng
b8905c4e2c
Fix PR3701. 1. X86 target renamed eflags register to flags. This matches what llvm-gcc generates so codegen knows flags register is being clobbered by inline asm. 2. BURR scheduler should also check if inline asm nodes can clobber "live" physical registers. Previously it was only checking target nodes with implicit defs.
...
llvm-svn: 65996
2009-03-04 01:41:49 +00:00
Devang Patel
812459613b
If a global constant is dead then global's debug info should not prevent the optimizer in deleting the global. And while deleting global, delete global's debug info also.
...
llvm-svn: 65994
2009-03-04 01:22:23 +00:00
Dale Johannesen
0365d3b8b5
Make my earlier patch to skip debug intrinsics
...
when counting work; it was only off by 1.
llvm-svn: 65993
2009-03-04 01:20:34 +00:00
Dale Johannesen
159d2159ee
Temporarily revert 65975, which breaks the llvm-gcc build.
...
While the patch is clearly correct in itself, it's become
apparent other places are assuming debug intrinsics are
marked as touching memory...this needs more testing.
llvm-svn: 65992
2009-03-04 01:14:28 +00:00
Bill Wendling
6d2714738f
The DAG combiner was performing a BT combine. The BT combine had a value of -1,
...
so it changed it into a 31 via the TLO.ShrinkDemandedConstant() call. Then it
would go through the DAG combiner again. This time it had a value of 31, which
was turned into a -1 by TLI.SimplifyDemandedBits(). This would ping pong
forever.
Teach the TLO.ShrinkDemandedConstant() call not to lower a value if the demanded
value is an XOR of all ones.
llvm-svn: 65985
2009-03-04 00:18:06 +00:00
Dale Johannesen
738c60f259
Marking debug info intrinsics as not touching memory
...
caused them to be considered trivially dead. Fix this.
llvm-svn: 65979
2009-03-03 23:30:00 +00:00
Dale Johannesen
09c3e8ec00
Instruction counters must skip the bitcasts that
...
feed into llvm.dbg.declare nodes, as well as
the debug directives themselves.
llvm-svn: 65976
2009-03-03 22:36:47 +00:00
Devang Patel
8720a0b9a7
Dbg Intrinsics do not access memory.
...
llvm-svn: 65975
2009-03-03 22:33:54 +00:00
Devang Patel
b833ce74d8
Recursively remove dead argument while removing llvm.dbg.declare intrinsic.
...
llvm-svn: 65971
2009-03-03 21:31:02 +00:00
Dale Johannesen
77456b7ab4
When removing a store to an alloca that has only one
...
use, check also for the case where it has two uses,
the other being a llvm.dbg.declare. This is needed so
debug info doesn't affect codegen.
llvm-svn: 65970
2009-03-03 21:26:39 +00:00
Chris Lattner
7956bba545
don't #include a header into the middle of an anon namespace.
...
llvm-svn: 65967
2009-03-03 20:10:23 +00:00
Dan Gohman
3a72265d41
Add '(implicit EFLAGS)' for AND, OR, XOR, NEG, INC, and DEC
...
instructions. These aren't used yet.
llvm-svn: 65965
2009-03-03 19:53:46 +00:00
Bob Wilson
530e038940
Use early exit to reduce indentation. No functional change.
...
llvm-svn: 65962
2009-03-03 19:26:27 +00:00
Bill Wendling
7fcd6148f7
Remove accidental check-ins in r65960. :-(
...
llvm-svn: 65961
2009-03-03 19:25:16 +00:00
Bill Wendling
a68fc7af63
Use > instead of >=. We want to promote aggregates of 128-bytes.
...
llvm-svn: 65960
2009-03-03 19:18:49 +00:00
Dan Gohman
9a8a28da99
Make a comment less terse.
...
llvm-svn: 65953
2009-03-03 17:44:54 +00:00
Bill Wendling
3e44bf3c4b
Reapply r65755, but reversing "<" to ">=".
...
llvm-svn: 65945
2009-03-03 12:12:58 +00:00
Mikhail Glushenkov
33435e49a9
Add example/Skeleton.
...
This is a template that can be used to build your own LLVMC-based drivers.
It can be also useful as a "bare-bones" LLVMC.
llvm-svn: 65944
2009-03-03 11:02:48 +00:00
Mikhail Glushenkov
b5f56fc268
Comment fixes.
...
llvm-svn: 65943
2009-03-03 10:04:57 +00:00
Mikhail Glushenkov
59a5afa996
Oops.
...
llvm-svn: 65942
2009-03-03 10:04:23 +00:00
Mikhail Glushenkov
4f85b86120
Use LLVMLIBS instead of USEDLIBS.
...
Since this Makefile is supposed to be usable from LLVM-based projects not in the
tree, LLVMLIBS should be used instead of USEDLIBS. This depends on my previous
fix to Makefile.rules.
llvm-svn: 65941
2009-03-03 10:03:53 +00:00
Mikhail Glushenkov
ab6f8ded33
LINK_COMPONENTS should be added to LLVMLibsOptions.
...
From the code: "There are "Proj" libs (defined by the user's project) and "LLVM"
libs (defined by the LLVM project)." LINK_COMPONENTS are clearly defined by the
LLVM project.
Additionally, this fixes an issue with llvmc's build process:-)
llvm-svn: 65940
2009-03-03 10:03:27 +00:00
Mikhail Glushenkov
b00b964697
Move example plugins to the example/ directory.
...
llvm-svn: 65939
2009-03-03 10:02:53 +00:00
Nick Lewycky
9e26e6d3cb
ENABLE_PIC is either 0 or 1, but is always defined.
...
llvm-svn: 65938
2009-03-03 07:45:09 +00:00
Mikhail Glushenkov
766d48947a
80-column violation + trailing whitespace.
...
llvm-svn: 65936
2009-03-03 07:22:23 +00:00
Zhou Sheng
506035105c
Ignore the debug info intrinsics when adding instructions into alias sets.
...
llvm-svn: 65934
2009-03-03 06:02:04 +00:00
Nick Lewycky
79a6fe91e0
This bug's been fixed but a version with the fix hasn't been released yet.
...
llvm-svn: 65931
2009-03-03 05:41:16 +00:00
Nick Lewycky
ed8472e8a1
Regenerate.
...
llvm-svn: 65928
2009-03-03 04:55:29 +00:00
Nick Lewycky
7d01e394ba
Switch to using -Wl,-R on Solaris.
...
llvm-svn: 65927
2009-03-03 04:55:15 +00:00
Nick Lewycky
9c51e8f962
Fix build on Cygwin.
...
llvm-svn: 65922
2009-03-03 03:36:50 +00:00
Dan Gohman
92b551bc2b
Fix a bunch of Doxygen syntax issues. Escape special characters,
...
and put @file directives on their own comment line.
llvm-svn: 65920
2009-03-03 02:55:14 +00:00
Dale Johannesen
0192552340
Don't count DebugInfo instructions in another limit
...
(lest they affect codegen).
llvm-svn: 65915
2009-03-03 01:43:03 +00:00
Dale Johannesen
fcf4ecec45
Testcase for line number sinking in InstCombine.
...
llvm-svn: 65911
2009-03-03 01:10:01 +00:00
Dale Johannesen
e1bb2f86f9
When sinking an insn in InstCombine bring its debug
...
info with it.
Don't count debug info insns against the scan maximum
in FindAvailableLoadedValue (lest they affect codegen).
llvm-svn: 65910
2009-03-03 01:09:07 +00:00
Devang Patel
cc40a61af7
Ignore debug info intrinsics.
...
llvm-svn: 65908
2009-03-03 00:28:44 +00:00
Devang Patel
d50ebbdf3f
If branch conditions' one successor is dominating another non-latch successor then this loop's iteration space can not be restricted. In this example block bb5 is always executed.
...
llvm-svn: 65902
2009-03-02 23:39:14 +00:00
Bob Wilson
85cefe8567
Generalize BuildVectorSDNode::isConstantSplat to use APInts and handle
...
arbitrary vector sizes. Add an optional MinSplatBits parameter to specify
a minimum for the splat element size. Update the PPC target to use the
revised interface.
llvm-svn: 65899
2009-03-02 23:24:16 +00:00
Bill Wendling
a347bc6700
Document the -gcc-tool-args bugpoint option.
...
llvm-svn: 65897
2009-03-02 23:15:59 +00:00
Bill Wendling
bf5d827194
Add a "-gcc-tool-args" option. This option acts like the "-tool-args" option,
...
but passes the arguments to the "gcc" invocation instead of to the "llc"
invocation.
llvm-svn: 65896
2009-03-02 23:13:18 +00:00
Nate Begeman
aa06843c56
Fix the calculation for how big the allocated stub needs to be.
...
llvm-svn: 65895
2009-03-02 23:10:14 +00:00
Devang Patel
49d64927e1
Remove all dbg symobls, including those with circular references.
...
This is ugly, but I can't figure out a quick way out of this.
llvm-svn: 65889
2009-03-02 22:50:58 +00:00
Chris Lattner
bab4417e05
Fix main executable path name resolution on FreeBSD, patch by
...
Ed Schouten!
llvm-svn: 65882
2009-03-02 22:17:15 +00:00
Daniel Dunbar
3854762d92
Add some more clang related release notes.
...
llvm-svn: 65868
2009-03-02 20:08:12 +00:00
Gabor Greif
659b0f3063
drop support for GCC 2.x as it is hopelessly broken anyway
...
llvm-svn: 65864
2009-03-02 19:49:29 +00:00
Tanya Lattner
8ae22cba41
Remove incorrect information about fortran on Darwin.
...
llvm-svn: 65859
2009-03-02 19:38:59 +00:00
Gabor Greif
6b30968114
fix broken GCC bugzilla link
...
llvm-svn: 65858
2009-03-02 19:11:53 +00:00
Gabor Greif
143bf8b5cd
add a Q/A on broken GCCs
...
llvm-svn: 65857
2009-03-02 19:08:05 +00:00
Chris Lattner
0c72d8f305
update blurb per Shannon Weyrick.
...
llvm-svn: 65856
2009-03-02 19:07:24 +00:00
Duncan Sands
d16340c846
Try to make the meaning of 'nocapture' a bit clearer. I
...
commented out the line about simplifylibcalls because I
think this doesn't work in the release (it was fixed in
svn after the release branched).
llvm-svn: 65846
2009-03-02 16:58:00 +00:00
Duncan Sands
2dbb00ea9a
Use GCC not gcc, like everywhere else in this document.
...
llvm-svn: 65845
2009-03-02 16:35:57 +00:00
John Criswell
ea03c9d300
Grammar and punctuation fixes.
...
No content changes.
llvm-svn: 65844
2009-03-02 15:28:15 +00:00
Gabor Greif
1ab00bf883
Declare Sentinel fragments as mutable to get rid
...
of some pointless casting. This fragment logically
does not belong to ilist anyway, but to "ghostly"
NodeType.
llvm-svn: 65843
2009-03-02 14:47:45 +00:00
Gabor Greif
502bf8d994
remove a deprecated interface that was pretty useless
...
llvm-svn: 65842
2009-03-02 12:42:07 +00:00
Gabor Greif
176c12dd38
note the removal of deprecated interfaces
...
llvm-svn: 65841
2009-03-02 12:23:55 +00:00
Gabor Greif
21e3ec35fe
fix typo
...
llvm-svn: 65839
2009-03-02 12:10:56 +00:00
Gabor Greif
75b2f76754
minor tweaks
...
llvm-svn: 65838
2009-03-02 12:02:51 +00:00
Gabor Greif
01c2ec85ed
minor tweaks
...
llvm-svn: 65837
2009-03-02 11:34:51 +00:00
Mikhail Glushenkov
c6333bdc50
Remove duplication in Makefile.rules.
...
Merge common bits from the LLVMC and TABLEGEN sections.
llvm-svn: 65834
2009-03-02 09:42:59 +00:00
Nicolas Geoffray
08a8d0e71e
Add more notes for VMKit.
...
llvm-svn: 65833
2009-03-02 09:25:38 +00:00
Duncan Sands
5795a6091d
Fix PR3694: add an instcombine micro-optimization that helps
...
clean up when using variable length arrays in llvm-gcc.
llvm-svn: 65832
2009-03-02 09:18:21 +00:00
Mikhail Glushenkov
7cff81825f
Move the rules for building plugins to Makefile.rules.
...
llvm-svn: 65827
2009-03-02 09:04:13 +00:00
Mikhail Glushenkov
37b419cdee
Fix build with objdir != srcdir.
...
llvm-svn: 65826
2009-03-02 09:03:36 +00:00
Mikhail Glushenkov
ecfab627fd
Move code from Main.cpp to the include dir.
...
User drivers based on llvmc must all share the initialization code.
Putting main() into libCompilerDriver is not a very good idea IMO (and ld gave
me some strange EH-related error anyway).
llvm-svn: 65825
2009-03-02 09:03:02 +00:00
Mikhail Glushenkov
f552ed69f9
Cosmetic fixes: include guards.
...
llvm-svn: 65824
2009-03-02 09:02:28 +00:00
Mikhail Glushenkov
a9780b2202
Plugin::Priority() doesn't need to be pure virtual.
...
llvm-svn: 65823
2009-03-02 09:02:01 +00:00
Mikhail Glushenkov
661f4c9131
Add a comment.
...
llvm-svn: 65822
2009-03-02 09:01:39 +00:00
Mikhail Glushenkov
931d4521c3
Reorganize llvmc code.
...
Move the code from 'llvmc/driver' into a new CompilerDriver library, and change
the build system accordingly. Makes it easier for projects using LLVM to build
their own llvmc-based drivers.
Tested with objdir != srcdir.
llvm-svn: 65821
2009-03-02 09:01:14 +00:00
Bill Wendling
89cd82f5da
Random formatting changes.
...
llvm-svn: 65815
2009-03-02 07:54:14 +00:00
Bill Wendling
b3921bf12e
Fix typos.
...
llvm-svn: 65813
2009-03-02 07:42:15 +00:00
Bill Wendling
f170d2e6c8
Change </pp> to </p>.
...
llvm-svn: 65804
2009-03-02 04:28:57 +00:00
Bill Wendling
87adbe4836
- Use "real-world applications" instead of just "real applications".
...
- Verification Fixes.
llvm-svn: 65803
2009-03-02 04:28:18 +00:00
Gordon Henriksen
29a25ebbd9
Make some improvements to the GC docs.
...
Also, drop reference to the half-baked runtime interface.
llvm-svn: 65802
2009-03-02 03:47:20 +00:00
Gordon Henriksen
3de1a09c86
Drop toy GC runtime.
...
llvm-svn: 65801
2009-03-02 03:46:48 +00:00
Chris Lattner
0ed1aa830b
remove empty section
...
llvm-svn: 65800
2009-03-02 03:24:41 +00:00
Chris Lattner
d434bfbdc4
more englishification
...
llvm-svn: 65799
2009-03-02 03:24:11 +00:00
Chris Lattner
d1094e032f
start translating this into Engrish and organizing it.
...
llvm-svn: 65797
2009-03-02 02:37:32 +00:00
Nate Begeman
a9e981225e
Fix a problem with DAGCombine on 64b targets where folding
...
extracts + build_vector into a shuffle would fail, because the
type of the new build_vector would not be legal. Try harder to
create a legal build_vector type. Note: this will be totally
irrelevant once vector_shuffle no longer takes a build_vector for
shuffle mask.
New:
_foo:
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
subps %xmm1, %xmm1
mulps %xmm0, %xmm1
addps %xmm0, %xmm1
movaps %xmm1, 0
Old:
_foo:
xorps %xmm0, %xmm0
movss %xmm0, %xmm1
xorps %xmm2, %xmm2
unpcklps %xmm1, %xmm2
pshufd $80, %xmm1, %xmm1
unpcklps %xmm1, %xmm2
pslldq $16, %xmm2
pshufd $57, %xmm2, %xmm1
subps %xmm0, %xmm1
mulps %xmm0, %xmm1
addps %xmm0, %xmm1
movaps %xmm1, 0
llvm-svn: 65791
2009-03-01 23:44:07 +00:00
Chris Lattner
705f0b764e
move gold plugin next to LTO doc in the subsystem section
...
llvm-svn: 65790
2009-03-01 23:42:51 +00:00
Nick Lewycky
b750d2266d
Add a quickstart example.
...
llvm-svn: 65789
2009-03-01 21:55:10 +00:00
Nick Lewycky
d70c8a8da6
Close list item tag, to conform with the style in this file. It's optional
...
anyways.
llvm-svn: 65787
2009-03-01 21:07:44 +00:00
Nick Lewycky
f268c6b2a3
Add the gold plugin page to the documentation index!
...
llvm-svn: 65786
2009-03-01 21:06:42 +00:00
Nick Lewycky
236e926c5b
Cleanup the description of flags to llvm-gcc. Also remove stray text in the
...
attribution.
llvm-svn: 65785
2009-03-01 20:58:07 +00:00
Nick Lewycky
6d1fc5c7e4
Don't forget the important part. llvm-gcc -use-gold-plugin passes the right
...
options to gold.
llvm-svn: 65783
2009-03-01 18:48:53 +00:00
Mikhail Glushenkov
254225489a
Sprinkle llvmc notes with <tt>.
...
Also removes some trailing whitespace.
llvm-svn: 65781
2009-03-01 18:09:47 +00:00
Gabor Greif
144fa6a08a
Another sentinel optimization. This one should always
...
be a win, since almost every interesting function has at least one Argument.
llvm-svn: 65778
2009-03-01 17:13:15 +00:00
Gabor Greif
6f8d4ae3c0
Reuse a technique (pioneered for BasicBlocks) of superposing ilist with
...
its sentinel. This is quite a win when a function really has a basic block.
When the function is just a declaration (and stays so) the old way did not
allocate a sentinel. So this change is most beneficial when the ratio of
function definition to declaration is high. I.e. linkers etc. Incidentally
these are the most resource demanding applications, so I expect that the
reduced malloc traffic, locality and space savings outweigh the cost of
addition of two pointers to Function.
llvm-svn: 65776
2009-03-01 16:38:10 +00:00
Duncan Sands
491f9e89ae
Functions marked malloc are noalias return.
...
llvm-svn: 65775
2009-03-01 16:19:31 +00:00
Duncan Sands
3d23bb03c1
Tweak this a bit.
...
llvm-svn: 65772
2009-03-01 15:19:03 +00:00
Duncan Sands
ef821b5fbe
Adjust this test for recent llvm-gcc changes.
...
llvm-svn: 65771
2009-03-01 15:01:51 +00:00
Nick Lewycky
b603c73e76
Fix grammar.
...
llvm-svn: 65769
2009-03-01 09:51:07 +00:00
Gabor Greif
b122c4cb1d
fix a comment
...
llvm-svn: 65768
2009-03-01 09:45:52 +00:00
Gabor Greif
19b2d443b5
Fix a typo. Thanks baldrick!
...
llvm-svn: 65767
2009-03-01 09:43:41 +00:00
Nick Lewycky
0a71fa9dc3
First pass at a document describing how to achieve LTO on Linux with gold.
...
llvm-svn: 65766
2009-03-01 09:38:29 +00:00
Duncan Sands
2166cb7673
Another point to mention.
...
llvm-svn: 65765
2009-03-01 08:26:19 +00:00
Bill Wendling
38eae046cf
Temporarily revert r65755. It was causing failures in the self-hosting
...
testsuite:
Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/dg.exp ...
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/nancvt.ll
Failed with exit(1) at line 2
while running: grep 2147027116 nancvt.ll.tmp | count 3
count: expected 3 lines and got 0.
child process exited abnormally
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/vec_ins_extract.ll
Failed with exit(1) at line 1
while running: llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/vec_ins_extract.ll | opt -scalarrepl -instcombine | llc -march=x86 -mcpu=yonah | not /usr/bin/grep sub.*esp
subl $28, %esp
subl $28, %esp
child process exited abnormally
And more.
llvm-svn: 65758
2009-03-01 03:55:12 +00:00
Chris Lattner
c92d769b41
add some llvmc notes from Mikhail
...
llvm-svn: 65756
2009-03-01 02:30:21 +00:00
Chris Lattner
e2bb5e31c8
hoist the check for alloca size up so that it controls CanConvertToScalar
...
as well as isSafeAllocaToScalarRepl.
llvm-svn: 65755
2009-03-01 02:26:47 +00:00
Evan Cheng
c2f95b56db
Minor optimization:
...
Look for situations like this:
%reg1024<def> = MOV r1
%reg1025<def> = MOV r0
%reg1026<def> = ADD %reg1024, %reg1025
r0 = MOV %reg1026
Commute the ADD to hopefully eliminate an otherwise unavoidable copy.
llvm-svn: 65752
2009-03-01 02:03:43 +00:00
Chris Lattner
25f282f566
tweak this to accept asmprinter changes. I have no way to verify this, hopefully
...
the buildbot will work.
llvm-svn: 65750
2009-03-01 01:28:40 +00:00
Chris Lattner
242d91a476
simplify handling "don't print top level name" processing, so that we get
...
stuff like %A = type { %A*} instead of an upref.
llvm-svn: 65748
2009-03-01 01:16:21 +00:00
Bob Wilson
d8ea0e144e
Combine PPC's GetConstantBuildVectorBits and isConstantSplat functions to a new
...
method in a BuildVectorSDNode "pseudo-class".
llvm-svn: 65747
2009-03-01 01:13:55 +00:00
Chris Lattner
89d856e9e0
Fix a pretty awesome bug that only happened in a strange case with anonymous
...
types. This was reading the uint for the keyword after the token was advanced.
llvm-svn: 65743
2009-03-01 00:53:13 +00:00
Chris Lattner
84516481f2
walk type symbol table also, so we get:
...
type opaque ; type %0
%C = type { %0, %0 }
instead of:
%C = type { opaque, opaque }
when appropriate.
llvm-svn: 65742
2009-03-01 00:32:33 +00:00
Chris Lattner
3c4f6be2b4
adjust for asmprinter change.
...
llvm-svn: 65741
2009-03-01 00:26:51 +00:00
Chris Lattner
fb97bdc6a7
adjust for asmprinter change.
...
llvm-svn: 65740
2009-03-01 00:25:46 +00:00
Chris Lattner
b23aad01de
adjust test to make it more robust
...
llvm-svn: 65739
2009-03-01 00:24:40 +00:00
Chris Lattner
3243ea111e
Fix a long-standing bug and misfeature of the disassembler: when dealing with a
...
stripped .bc file, it didn't make any attempt to try to reuse anonymous types.
This causes an amazing type explosion due to types getting duplicated everywhere
they are referenced and other problems.
This also caused correctness issues, because opaque types are unique for each time
they are uttered in the file. This means that stripping a .bc file could produce
a .ll file that could not be assembled (e.g. 2009-02-28-StripOpaqueName.ll).
This patch fixes both of these issues.
llvm-svn: 65738
2009-03-01 00:03:38 +00:00
Chris Lattner
92c5c12bdb
move type name population out of TypePrinting class into a static
...
AsmWriter.cpp method.
llvm-svn: 65736
2009-02-28 23:20:19 +00:00
Chris Lattner
3339d7f8bc
switch to densemap for pointer->word map.
...
llvm-svn: 65735
2009-02-28 23:03:55 +00:00
Chris Lattner
b543cae7d6
delete a bunch of duplicated type printing logic, using the type printing
...
stuff in AsmWriter.cpp for Type::getDescription().
llvm-svn: 65734
2009-02-28 23:01:57 +00:00
Chris Lattner
63220af1ca
make this work when constructed with a null module*
...
llvm-svn: 65733
2009-02-28 23:01:30 +00:00
Gabor Greif
d07987f5b6
add description how the ilist_traits<Instruction> works
...
llvm-svn: 65732
2009-02-28 22:46:37 +00:00
Chris Lattner
faaa7ac1f2
the module is not required to exist, allow it to default, giving this
...
class a nice default ctor.
llvm-svn: 65731
2009-02-28 22:41:33 +00:00
Chris Lattner
3a5e4d7a2e
disable copying and assignment.
...
llvm-svn: 65730
2009-02-28 22:35:24 +00:00
Chris Lattner
3ad4682b23
expose TypePrinting as a public API.
...
llvm-svn: 65729
2009-02-28 22:34:45 +00:00
Chris Lattner
e2a87a98b3
one less space, fixes failure with rebuilt llvm-gcc.
...
llvm-svn: 65728
2009-02-28 22:20:02 +00:00
Bill Wendling
050ee8fb8d
Fix grammaro.
...
llvm-svn: 65727
2009-02-28 22:12:54 +00:00
Chris Lattner
06a2321051
rename 'Result' to 'OS' in CalcTypeName for consistency
...
llvm-svn: 65724
2009-02-28 21:27:31 +00:00
Chris Lattner
e101c44d77
do not embed the raw_ostream into TypePrinting, pass it as an argument to print etc.
...
llvm-svn: 65723
2009-02-28 21:26:53 +00:00
Chris Lattner
68318b1535
stop calling Type::getDescription().
...
llvm-svn: 65722
2009-02-28 21:18:43 +00:00
Chris Lattner
2ee62d28c1
simplifications
...
llvm-svn: 65721
2009-02-28 21:11:05 +00:00
Chris Lattner
24025261d3
Change WriteTypeSymbolic to not put a space out before types, also, remove
...
the old std::ostream version.
llvm-svn: 65720
2009-02-28 21:05:51 +00:00
Chris Lattner
40959d03cb
make CalcTypeName take a stream instead of a string to concat onto,
...
eliminate redundant opaque handling code.
llvm-svn: 65716
2009-02-28 20:49:40 +00:00
Chris Lattner
eb23f87289
remove a bunch of nearly-duplicated code.
...
llvm-svn: 65715
2009-02-28 20:40:29 +00:00
Chris Lattner
07d8829df9
fix indentation, remove dead integer case.
...
llvm-svn: 65714
2009-02-28 20:35:42 +00:00
Chris Lattner
765338decf
pull calcTypeName into TypePrinting class, make its type stack
...
be a smallvector instead of vector.
llvm-svn: 65713
2009-02-28 20:34:19 +00:00
Chris Lattner
7b394e87ff
inline method into its only use and simplify the result.
...
llvm-svn: 65712
2009-02-28 20:31:14 +00:00
Chris Lattner
1273471795
simplify condition
...
llvm-svn: 65711
2009-02-28 20:28:50 +00:00
Chris Lattner
0f57895708
start refactoring the .ll printer: introduce a new TypePrinting class
...
and move all related stuff to it.
llvm-svn: 65710
2009-02-28 20:25:14 +00:00
Chris Lattner
fb23a968ad
add a stub for Roadsend PHP
...
llvm-svn: 65705
2009-02-28 18:58:01 +00:00
Chris Lattner
361bfcd932
don't use the word 'aggregate' with constants, it is confusing.
...
llvm-svn: 65702
2009-02-28 18:32:25 +00:00
Chris Lattner
789dee38a5
don't redescribe bitcast constraints in two places. It is not valid to
...
bitcast from one aggregate to another.
llvm-svn: 65700
2009-02-28 18:27:03 +00:00
Chris Lattner
bb1fe8abdd
reject 0 element vectors with:
...
@a = internal constant void bitcast(<0 x i8> <> to void)
^
Fixes PR3685
llvm-svn: 65698
2009-02-28 18:12:41 +00:00
Nick Lewycky
cd5b1443bb
Update this text for first-class aggregates.
...
llvm-svn: 65697
2009-02-28 17:30:06 +00:00
Bill Wendling
638b836aab
Fix typo. Found by William Moss.
...
llvm-svn: 65693
2009-02-28 12:26:34 +00:00
Bill Wendling
6311d06b2f
There is a way to specify targets that should succeed. It's the "XTARGET"
...
keyword.
llvm-svn: 65692
2009-02-28 12:11:01 +00:00