Commit Graph

29455 Commits

Author SHA1 Message Date
Owen Anderson
a9d1f2c559 Have scoped mutexes take referenes instead of pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74931 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 18:33:04 +00:00
Chris Lattner
a9b7d60d67 Eliminate the static constructors and locks from DynamicLibrary.cpp.
This fixes PR4512 and eliminating static ctors is always good.  Losing
thread safety is unfortunate, but the code is just incredibly poorly
designed.

If someone is interested, the "right" solution is to split
DynamicLibrary.cpp into two separate pieces: a stateless piece in
libsystem, and a simple support file in libsupport that has the
"state" (e.g.  AddSymbol) in managed static objects.

Doing this would both fix memory leaks we already have, as well as make
the code thread safe again.  it would also make sense to move all the
unix specific code in System/DynamicLibrary.cpp into 
System/Unix/DynamicLibrary.inc.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74927 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 18:17:07 +00:00
Chris Lattner
72501b4a21 remove dead code, noone creates instances of "DynamicLibrary", so the ctor and dtor are dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74926 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 18:01:58 +00:00
Evan Cheng
ddb03d831b Revert 74898. It broke several tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74925 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 17:50:43 +00:00
Chris Lattner
0875c7ccf5 we don't use libtool anymore, update comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74924 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 17:50:11 +00:00
Torok Edwin
f361238a93 Fix braces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74923 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 17:39:53 +00:00
Torok Edwin
31e2466f15 Introduce new error handling API.
This will replace exit()/abort() style error handling with an API
that allows clients to register custom error handling hooks.
The default is to call exit(1) when no error handler is provided.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74922 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 17:32:34 +00:00
Owen Anderson
9903527c14 Re-LLVMContext-ize DebugInfo, now with less breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74920 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 17:12:53 +00:00
Dan Gohman
0bba49cebc Change all SCEV* to SCEV *.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74918 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 17:06:11 +00:00
Owen Anderson
e277fed6eb Revert part of r74873 that broke Clang's debug info generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74910 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 16:31:25 +00:00
Sanjiv Gupta
1dd35b4c35 if the terminator is a branch depending upon the side effects of a
previous cmp; a copy can not be inserted here if the copy insn also has
 side effects. We don't have access to the attributes of copy insn here;
 so just play safe by finding a safe locations for branch terminators.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74898 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 08:04:51 +00:00
Evan Cheng
40289b041a Add Thumb2 pkhbt / pkhtb.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74895 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 05:35:52 +00:00
Evan Cheng
5b9fcd1c8e Add some more Thumb2 multiplication instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74889 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 01:17:28 +00:00
Evan Cheng
58541fd627 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74888 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 01:16:41 +00:00
Dale Johannesen
76a1e2e250 Don't accept globals as matching 'i' constraint
in PIC modes (in accordance with existing comment).
gcc.apple/asm-block-25.c



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74886 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 00:18:49 +00:00
Devang Patel
a41a5dc3b7 !"i" is a valid MDString.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74881 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 23:40:48 +00:00
Devang Patel
92c551103f Avoid directly relying on llvm.dbg.compile_unit and llvm.dbg.global_variables.
PIC16 developers, please verify. Thanks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74880 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 23:28:36 +00:00
Devang Patel
8d6162a4be Add FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74879 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 23:11:08 +00:00
Owen Anderson
07cf79ef53 "LLVMContext* " --> "LLVMContext *"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74878 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 23:00:19 +00:00
Owen Anderson
76f600b205 Finish LLVMContext-ing lib/Analysis. This required pushing LLVMContext's through the ValueTracking API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74873 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 22:37:39 +00:00
Evan Cheng
3147fb2cff isThumb2 really should mean thumb2 only, not thumb2+.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74871 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 22:29:14 +00:00
Evan Cheng
36a0aebac2 Add bfc to armv6t2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74868 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 22:23:46 +00:00
Evan Cheng
edcbada3d0 Added ARM::mls for armv6t2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74866 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 22:05:45 +00:00
Evan Cheng
2c4d96dfe9 Avoid adding a duplicate def. This fixes PR4478.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74857 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 21:34:05 +00:00
Owen Anderson
643dda1d62 No need to double-include config.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74854 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 21:24:37 +00:00
Owen Anderson
3d7622d0f5 We need to include config.h to get the proper setting to LLVM_MULTITHREADED.
Patch by Xerxes Ranby.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74846 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 18:50:47 +00:00
Owen Anderson
508955156a Thread LLVMContext through the constant folding APIs, which touches a lot of files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74844 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 18:42:36 +00:00
Sanjiv Gupta
53cf8298cf pic16 doesn't have a Data64bitsDirective. Set it NULL explicitly to tell the generic code to not pick the default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74839 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 18:09:11 +00:00
Sanjiv Gupta
024e94ce58 pic16 isn't ready to handle llvm.metadata yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74838 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 18:07:06 +00:00
Chris Lattner
e4840bc611 Add two new accessors to the C bindings, patch by Wladimir van der Laan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74836 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 17:29:59 +00:00
Chris Lattner
c880815c40 improve portability to windows, patch by Xerces Ranby!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74835 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 17:24:48 +00:00
Jeffrey Yasskin
4733e747d1 Oops, I #included errno.h from inside the llvm::sys namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74834 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 16:50:27 +00:00
Duncan Sands
08b7daf3ff Fix the cmake build - patch by Xerxes Rånby.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74825 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 14:28:32 +00:00
Sanjiv Gupta
2f8ca29a70 Reverting back the changes checked-in accidently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74823 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 10:34:10 +00:00
Sanjiv Gupta
505996fdd5 Implement _CONFIG macro to allow users to se to configuration settings on the part.
Implement _section macro to allow users to place objects in specific sections.
Implement _address macro to allow users to place objects at a particular address.
Placing objects at a memory address:
crate a unique section name from varname, address, object type and put that section at specified address. Mark this section a full (size = banksize) so that other objects do not compete for it while placing objects to sections in AsmPrinter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74822 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 10:18:37 +00:00
Bruno Cardoso Lopes
6933d3eff8 Changed ELFCodeEmitter to inherit from ObjectCodeEmitter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74821 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 09:26:48 +00:00
Sanjiv Gupta
d7649417d1 Corrected the names description. Change in a comment. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74819 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 08:22:15 +00:00
Bruno Cardoso Lopes
752e928e6b Cleanup MachO writer and code emitter. Fix 80 cols problems, remove extra spaces, shrink down includes and move some methods out-of-line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74817 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 06:40:51 +00:00
Bruno Cardoso Lopes
8ae058a815 Just forgot to include the two new files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74814 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 05:16:40 +00:00
Bruno Cardoso Lopes
ac57e6e498 Add the Object Code Emitter class. Original patch by Aaron Gray, I did some
cleanup, removed some #includes and moved Object Code Emitter out-of-line.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74813 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 05:09:34 +00:00
Owen Anderson
14ce9ef2e9 More LLVMContext-ification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74811 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 01:34:54 +00:00
Owen Anderson
0a205a4598 More LLVMContext-ification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74807 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-05 22:41:43 +00:00
Nick Lewycky
d1ec98923e When comparing constants, consider a less wide constant to be "less complex"
than a wider one, before trying to compare their contents which will crash
if their sizes are different.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74792 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-04 17:24:52 +00:00
Mikhail Glushenkov
eebf60cae5 Make -save-temps=obj play better with -o.
Use only the *dirname* of the pathname given to -o, so that -o can still be used
to name the output executable. This is more like what GCC 4.5 does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74790 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-04 14:23:32 +00:00
Mikhail Glushenkov
cc4f8bcedc LLVMC can be now compiled w/o dynamic plugin support.
Controlled via the --enable-llvmc-dynamic-plugins option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74784 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-04 03:55:25 +00:00
Mikhail Glushenkov
86a3510a68 LLVMC doesn't need ENABLE_PIC to build now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74783 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-04 03:54:54 +00:00
Mike Stump
9d1a81daaa Fix build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74782 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 22:11:58 +00:00
Owen Anderson
fa5cbd6d0f Even more passes being LLVMContext'd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74781 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 19:42:02 +00:00
Nick Lewycky
715029478c Add Static Single Information construction pass written by André Tavares!
Use it by requiring it through the pass manager, then calling its createSSI
method on the variables that you want in SSI form.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74780 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 19:28:36 +00:00
Duncan Sands
430506924d Silence a warning when assertions are turned off.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74779 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 16:11:59 +00:00