Owen Anderson
179a1f49dc
Type safety for TypeSymbolTable!
...
llvm-svn: 73614
2009-06-17 16:56:27 +00:00
Chris Lattner
a8c5b43391
make sure that JIT examples link in their appropriate target.
...
llvm-svn: 73613
2009-06-17 16:48:44 +00:00
Chris Lattner
213e8cbce7
remove two headers subsumed by TargetSelect.h
...
llvm-svn: 73612
2009-06-17 16:45:02 +00:00
Chris Lattner
be0596427d
switch to using llvm/Target/TargetSelect.h
...
llvm-svn: 73611
2009-06-17 16:42:19 +00:00
Chris Lattner
21f6855b00
Add a utility header that makes it easy to link in the right set
...
of targets for various purposes.
llvm-svn: 73610
2009-06-17 16:42:01 +00:00
Owen Anderson
c40f3f2752
Improve the Win32 reader-writer lock implementation by making it just a normal
...
lock. This is obviously bad, but at least it's threadsafe! If you know how
to improve this in a pre-Vista friendly well, patches welcome!
Patch by Max Burke.
llvm-svn: 73607
2009-06-17 09:10:42 +00:00
Nick Lewycky
1704e96a5f
Fix libLTO by #include'ing the initializers for all targets and all asm
...
printers.
While I'm here, alphabetize.
llvm-svn: 73606
2009-06-17 06:52:10 +00:00
Sanjiv Gupta
6d9a123c1d
>> What if my global variable was into a different address space than stack?
...
>>
>
> It doesn't matter in terms of semantics: because AnalyzeGlobal
> returned false, we're guaranteed the address of the global is never
> taken. I wouldn't be surprised if we end up generating invalid IR in
> some cases, though, because of the semantics of replaceAllUsesWith.
> Do you have a testcase that breaks?
>
>
The problem is replaceAllUsesWith asserts for type mismatch here. Try attached .bc with llvm-ld.
assert(New->getType() == getType() &&
"replaceAllUses of value with new value of different type!");
Since stack is always on address space zero, I don't think that type of GV in a different address space is ever going to match.
The other way is to allow replaceAllUsesWith to ignore address spaces while comparing types. (do we have a way to do that ?).
But then such an optimization may fail the entire idea of user wanting to place a variable into different memory space. The original idea of user might be to save on the stack space (data memory) and hence he asked the variable to be placed into different memory space (program memory). So the best bet here is to deny this optimization by checking
GV->getType()->getAddressSpace() == 0.
llvm-svn: 73605
2009-06-17 06:47:15 +00:00
Chris Lattner
ee538a1431
make CreateFMul forward to CreateFMul, not CreateMul.
...
llvm-svn: 73603
2009-06-17 06:31:02 +00:00
Nick Lewycky
46f767dd67
Fix grammaro, and bad indentation.
...
llvm-svn: 73602
2009-06-17 04:23:52 +00:00
Mikhail Glushenkov
dd69113516
Fix comment.
...
llvm-svn: 73601
2009-06-17 03:10:10 +00:00
Mikhail Glushenkov
4afdb113a9
Formatting fix.
...
llvm-svn: 73600
2009-06-17 03:09:39 +00:00
Eli Friedman
36d7ca738e
Correct an accidental duplication of the test (patch doesn't handle
...
creating new files very well).
llvm-svn: 73599
2009-06-17 03:05:00 +00:00
Eli Friedman
b3947071ff
PR3439: Correct a silly mistake in the SimplifyDemandedUseBits code for
...
SRem.
llvm-svn: 73598
2009-06-17 02:57:36 +00:00
Mikhail Glushenkov
7f2af8872d
Regenerate.
...
llvm-svn: 73597
2009-06-17 02:56:48 +00:00
Mikhail Glushenkov
b9a0c7b6dd
Another small documentation update.
...
llvm-svn: 73596
2009-06-17 02:56:08 +00:00
Chris Lattner
90f1ab8c92
Use Doug's new LLVM_NATIVE_ARCH macro in config.h to link in the native
...
target so that the JIT works in LLI, not just the interpreter.
llvm-svn: 73595
2009-06-17 02:15:40 +00:00
Dan Gohman
473789f75a
Fix ScalarEvolution's Xor handling to not assume that an And
...
that gets recognized with a SCEVZeroExtendExpr must be an And
with a low-bits mask. With r73540, this is no longer the case.
llvm-svn: 73594
2009-06-17 01:22:39 +00:00
Devang Patel
db78831eaa
Do not use first actual instruction's location for prologue. The debug wants to skip prologue while setting a breakpoint for the function.
...
llvm-svn: 73592
2009-06-17 00:48:26 +00:00
Douglas Gregor
3e9d15410b
Update auto-generated configuration files
...
llvm-svn: 73591
2009-06-17 00:43:20 +00:00
Douglas Gregor
9678705cc5
Define LLVM_NATIVE_ARCH in llvm/Config/config.h to be the LLVM back end that corresponds to the native executable, but only when that LLVM back end is being built
...
llvm-svn: 73590
2009-06-17 00:42:33 +00:00
Owen Anderson
3637fc65bd
Use atomic increment/decrement for reference counting of Type's.
...
llvm-svn: 73588
2009-06-17 00:28:49 +00:00
Owen Anderson
430f18d2db
Add an atomic increment and decrement implementation, which will be used for
...
thread-safe reference counting.
llvm-svn: 73587
2009-06-17 00:13:00 +00:00
Owen Anderson
b34766ddc8
Add locking around the accessors for AbstractTypeUsers.
...
llvm-svn: 73586
2009-06-17 00:12:30 +00:00
Chris Lattner
3c85f09f57
Remove support for building LLVM libraries into "relinked"
...
object files. Now we always build LLVM libraries into archives (.a files).
This makes the 'make' build work more like the cmake build, among other
things. Doing this exposed some latent circular library dependencies, so
I think that llvm-config wasn't quite right for .o files anyway.
llvm-svn: 73579
2009-06-16 23:00:42 +00:00
Owen Anderson
3974972558
Forgot this file in my last commit.
...
llvm-svn: 73578
2009-06-16 22:56:04 +00:00
Owen Anderson
d1fbbd8273
Use a reader-writer lock to guard large portions of the Type infrastructure, including abstract type refinement.
...
There's still some more work to be done here, such as guarding removeAbstractTypeUser() and the printers.
llvm-svn: 73575
2009-06-16 22:51:18 +00:00
Chris Lattner
d2950fdaf8
fix a circular dependency between the mips code generator
...
and its asmprinter.
llvm-svn: 73573
2009-06-16 22:38:04 +00:00
Chris Lattner
dab29b9f77
Fix the EE bindings to use the proper EE interfaces for creating a JIT.
...
Calling into createJIT directly creates a circular dependency between libjit and lib ee.
llvm-svn: 73567
2009-06-16 22:26:13 +00:00
Douglas Gregor
0e78e242d7
CMake: Only include LLVM example executables in the build if requested by the user
...
llvm-svn: 73566
2009-06-16 22:25:45 +00:00
Dale Johannesen
64c7072138
Test for llvm-gcc patch 73564.
...
llvm-svn: 73565
2009-06-16 22:18:33 +00:00
Owen Anderson
aaf83d86b8
Accidentally broke this file.
...
llvm-svn: 73552
2009-06-16 20:57:51 +00:00
Owen Anderson
5c476a6687
Add newline at end of file.
...
llvm-svn: 73551
2009-06-16 20:53:09 +00:00
Owen Anderson
208c38b522
Remove the Win32 implementation, since it doesn't compile pre-Vista.
...
llvm-svn: 73550
2009-06-16 20:49:20 +00:00
Owen Anderson
c52c99f111
Fix #include guards.
...
llvm-svn: 73548
2009-06-16 20:26:04 +00:00
Anton Korobeynikov
d6004a164c
Make the test target-neutral
...
llvm-svn: 73547
2009-06-16 20:25:25 +00:00
Owen Anderson
30a1b2528a
Fix/cleanup trailing newlines.
...
llvm-svn: 73546
2009-06-16 20:23:05 +00:00
Owen Anderson
48d53f2c53
Add a portable wrapper for reader-writer locks.
...
llvm-svn: 73545
2009-06-16 20:19:28 +00:00
Douglas Gregor
f5291553f2
Introduce new headers whose inclusion forces linking and
...
initialization of all targets (InitializeAllTargets.h) or assembler
printers (InitializeAllAsmPrinters.h). This is a step toward the
elimination of relinked object files, so that we can build normal
archives.
llvm-svn: 73543
2009-06-16 20:12:29 +00:00
Dan Gohman
54bbef1525
Generalize a few more instcombines to be vector/scalar-independent.
...
llvm-svn: 73541
2009-06-16 19:55:29 +00:00
Dan Gohman
56b5a88785
Instcombine's ShrinkDemandedConstant may strip bits out of constants,
...
obscuring what would otherwise be a low-bits mask. Use ComputeMaskedBits
to compute what ShrinkDemandedConstant knew about to reconstruct a
low-bits mask value.
llvm-svn: 73540
2009-06-16 19:52:01 +00:00
Evan Cheng
c2b51a746a
CALL64pcrel32 immediate field is 32-bit. Patch by Abhinav Duggal.
...
llvm-svn: 73536
2009-06-16 19:44:27 +00:00
Anton Korobeynikov
cc8d0058e2
Address review comments: add 3 ARM calling conventions.
...
Dispatch C calling conv. to one of these conventions based on
target triple and subtarget features.
llvm-svn: 73530
2009-06-16 18:50:49 +00:00
Anton Korobeynikov
a74b8323d0
GNU as refuses to assemble "pop {}" instruction. Do not emit such
...
(this is the case when we have thumb vararg function with single
callee-saved register, which is handled separately).
llvm-svn: 73529
2009-06-16 18:49:08 +00:00
Owen Anderson
8a07791070
Add a configure check for pthread_rwlock_init.
...
llvm-svn: 73523
2009-06-16 18:20:20 +00:00
Owen Anderson
e6d490721a
Update the threading section to reflect current plans/implementation.
...
llvm-svn: 73521
2009-06-16 18:04:19 +00:00
Douglas Gregor
4bf70ccfd6
Add Threading.cpp to the CMake project files
...
llvm-svn: 73516
2009-06-16 17:45:38 +00:00
Owen Anderson
45f4444e73
Fix validation errors.
...
llvm-svn: 73515
2009-06-16 17:40:28 +00:00
Owen Anderson
b7cdd1a395
Split the thread-related APIs out into their own file, and add a few more
...
calls for convenience.
llvm-svn: 73512
2009-06-16 17:33:51 +00:00
Chris Lattner
f54c97c579
Testcase for r73506
...
llvm-svn: 73508
2009-06-16 17:23:25 +00:00