Commit Graph

102814 Commits

Author SHA1 Message Date
Ken Dyck 6d470d9398 Use CharUnits's new increment operator. No change in functionality intended.
llvm-svn: 127938
2011-03-19 01:28:06 +00:00
Ken Dyck 54d4d9fb19 Add pre- and post-increment/decrement operators to CharUnits.
llvm-svn: 127937
2011-03-19 01:25:59 +00:00
Johnny Chen 5c07daaa1d Modify disasm.py to better deal with the objc method name which has ':' in them.
Add a utility similar to disasm.py, but which provides a shell-like environment for invoking llvm-mc.

llvm-svn: 127936
2011-03-19 01:24:25 +00:00
Johnny Chen 0c5f670fe7 Fixed an assert by the ARM disassembler for LDRD_PRE/POST.
The relevant instruction table entries were changed sometime ago to no longer take
<Rt2> as an operand.  Modify ARMDisassemblerCore.cpp to accomodate the change and
add a test case.

llvm-svn: 127935
2011-03-19 01:16:20 +00:00
Greg Clayton ded470d31a Added more platform support. There are now some new commands:
platform status -- gets status information for the selected platform
platform create <platform-name> -- creates a new instance of a remote platform
platform list -- list all available platforms
platform select -- select a platform instance as the current platform (not working yet)

When using "platform create" it will create a remote platform and make it the
selected platform. For instances for iPhone OS debugging on Mac OS X one can 
do:

(lldb) platform create remote-ios --sdk-version=4.0
Remote platform: iOS platform
SDK version: 4.0
SDK path: "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0"
Not connected to a remote device.
(lldb) file ~/Documents/a.out
Current executable set to '~/Documents/a.out' (armv6).
(lldb) image list
[  0] /Volumes/work/gclayton/Documents/devb/attach/a.out
[  1] /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/dyld
[  2] /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/libSystem.B.dylib


Note that this is all happening prior to running _or_ connecting to a remote
platform. Once connected to a remote platform the OS version might change which
means we will need to update our dependecies. Also once we run, we will need
to match up the actualy binaries with the actualy UUID's to files in the
SDK, or download and cache them locally.

This is just the start of the remote platforms, but this modification is the
first iteration in getting the platforms really doing something.

llvm-svn: 127934
2011-03-19 01:12:21 +00:00
Daniel Dunbar 5366ff1865 Preprocessor: Don't define __STDC__ in -traditional-cpp mode.
llvm-svn: 127933
2011-03-19 01:04:12 +00:00
Ted Kremenek a872326929 Recovery memory from TypeLocBuilders during crashes.
llvm-svn: 127932
2011-03-19 01:00:38 +00:00
Ted Kremenek f75d089679 Recover memory from RecordLayoutBuilders during crashes.
llvm-svn: 127931
2011-03-19 01:00:36 +00:00
Ted Kremenek ddc06d0bd0 Rename class 'CFGReachabilityAnalysis' to 'CFGReverseBlockReachabilityAnalysis'.
This rename serves two purposes:

- It reflects the actual functionality of this analysis.
- We will have more than one reachability analysis.

llvm-svn: 127930
2011-03-19 01:00:33 +00:00
Ted Kremenek 32aea2e401 Tweak CrashRecoveryContextCleanup to provide an easy method for clients to select between 'delete' and 'destructor' cleanups, and allow the destructor of CrashRecoveryContextCleanupRegister to be pseudo re-entrant.
llvm-svn: 127929
2011-03-19 00:59:37 +00:00
Ted Kremenek 794a0714ad Tweak CrashRecoveryContext::GetCurrent() to return quickly if 'gCrsahRecoveryEnabled' is false. This avoids us needing to go to thread local storage for
the performance sensitive case where we are compiling code.

llvm-svn: 127928
2011-03-19 00:59:33 +00:00
Ken Dyck 0f2f30b241 Replace literal '8's with CharWidth in AppendBitField. No change in
functionality intended.

llvm-svn: 127927
2011-03-19 00:57:28 +00:00
Andrew Trick e7537a0187 FileCheckize a test.
(one-by-one until valgrind is happy)

llvm-svn: 127925
2011-03-19 00:41:39 +00:00
Devang Patel 2c7ee2700c If an AllocaInst referred by DbgDeclareInst is used by a LoadInst then the LoadInst should also get a corresponding llvm.dbg.value intrinsic.
llvm-svn: 127924
2011-03-18 23:45:43 +00:00
Devang Patel 3ac171d49a Remove dead code.
llvm-svn: 127923
2011-03-18 23:33:58 +00:00
Devang Patel c1431e6e84 Consider debug info intrinsics pointing to null value as dead instructions.
llvm-svn: 127922
2011-03-18 23:28:02 +00:00
Ted Kremenek 1ec7b33079 Add libclang hook 'clang_toggleCrashRecovery()', which provides a mechanism for a client to enable/disable CrashRecovery within libclang function calls.
llvm-svn: 127920
2011-03-18 23:05:39 +00:00
Ted Kremenek 21c7e6e298 Run all functional logic of clang_annotateTokens() within a CrashRecoveryContext. Fixes <rdar://problem/9121698>.
llvm-svn: 127919
2011-03-18 22:51:30 +00:00
Jim Grosbach 54140eb568 Silence a warning.
llvm-svn: 127918
2011-03-18 22:50:49 +00:00
Owen Anderson 1d2f5cebe4 Add support to the ARM asm parser for the register-shifted-register forms of basic instructions like ADD. More work left to be done to support other instances of shifter ops in the ISA.
llvm-svn: 127917
2011-03-18 22:50:18 +00:00
Jim Grosbach 7b162490fd Beginnings of MC-JIT code generation.
Proof-of-concept code that code-gens a module to an in-memory MachO object.
This will be hooked up to a run-time dynamic linker library (see: llvm-rtdyld
for similarly conceptual work for that part) which will take the compiled
object and link it together with the rest of the system, providing back to the
JIT a table of available symbols which will be used to respond to the
getPointerTo*() queries.

llvm-svn: 127916
2011-03-18 22:48:41 +00:00
Peter Collingbourne 599cb8e430 Add support for language-specific address spaces. On top of that,
add support for the OpenCL __private, __local, __constant and
__global address spaces, as well as the __read_only, _read_write and
__write_only image access specifiers.  Patch originally by ARM;
language-specific address space support by myself.

llvm-svn: 127915
2011-03-18 22:38:29 +00:00
Ted Kremenek d15609a582 Remove '-Xclang' and '-mllvm' entries from Clang man page. The later is only available in debug builds and the former is not supposed to be used by end-users.
llvm-svn: 127914
2011-03-18 22:11:40 +00:00
Evan Cheng dc1d626a3d Match a few more obvious patterns to revsh. rdar://9147637.
llvm-svn: 127913
2011-03-18 21:52:42 +00:00
Jakob Stoklund Olesen 816f5f4c2a Extend live debug values down the dominator tree by following copies.
The llvm.dbg.value intrinsic refers to SSA values, not virtual registers, so we
should be able to extend the range of a value by tracking that value through
register copies. This greatly improves the debug value tracking for function
arguments that for some reason are copied to a second virtual register at the
end of the entry block.

We only extend the debug value range where its register is killed. All original
llvm.dbg.value locations are still respected.

Copies from physical registers are ignored. That should not be a problem since
the entry block already adds DBG_VALUE instructions for the virtual registers
holding the function arguments.

llvm-svn: 127912
2011-03-18 21:42:19 +00:00
Daniel Dunbar 8c3d735118 Driver: Forward -traditional and -traditional-cpp in preprocessing modes.
- We don't really support the majority of the horrible -traditional-cpp
   behavior, but it is unlikely that we ever will either. This allows us to
   start trying to use clang as a /usr/bin/cpp replacement and see what pieces
   of -traditional-cpp mode people actually care about.

llvm-svn: 127911
2011-03-18 21:23:40 +00:00
Daniel Dunbar 1057f86d0e Lexer: Add extremely limited support for -traditional-cpp, ignoring BCPL
comments.

llvm-svn: 127910
2011-03-18 21:23:38 +00:00
Eli Friedman 59721e3238 Revert r127852; it's apparently causing an ICE on mingw.
llvm-svn: 127909
2011-03-18 21:12:29 +00:00
Johnny Chen d3a4e7eee5 Add cases to test that two template instantiations of std::vector<long> and std::vector<short>
in the same compilation module show up as different types for lldb debugger.

llvm-svn: 127904
2011-03-18 20:51:13 +00:00
Daniel Dunbar 151a372113 Driver/Darwin: Transparently fallback when compiling i386 -fapple-kext code, we
don't support the ABI yet.

llvm-svn: 127903
2011-03-18 20:14:03 +00:00
Daniel Dunbar 1e1c3ca51c Driver: Give SelectTool access to the action inputs.
llvm-svn: 127902
2011-03-18 20:14:00 +00:00
Rafael Espindola 5b778b2e60 Use lazy parsing in LTO. Unfortunately this is only a 3% time saving for
'ar'. Have to figure out how to make libLTO even lazier.

llvm-svn: 127901
2011-03-18 19:51:00 +00:00
Owen Anderson 9c6456e82e Clean whitespace.
llvm-svn: 127900
2011-03-18 19:47:14 +00:00
Owen Anderson 6d55745d2f Reduce code duplication.
llvm-svn: 127899
2011-03-18 19:46:58 +00:00
Caroline Tice 77c13fe304 Fix various small problems with EmulateInstructionARM::EmulateSTRRtSP.
llvm-svn: 127898
2011-03-18 19:41:00 +00:00
Daniel Dunbar c76a9e6962 Driver/Darwin: Change fallback to use llvm-gcc search paths instead of GCC.
llvm-svn: 127897
2011-03-18 19:25:15 +00:00
Daniel Dunbar 50fab351d7 Driver/Darwin: Kill the DarwinGCC toolchain.
llvm-svn: 127896
2011-03-18 19:25:10 +00:00
Justin Holewinski 0984dcc077 PTX: Fix various codegen issues
- Emit mad instead of mad.rn for shader model 1.0
- Emit explicit mov.u32 instructions for reading global variables
- (most PTX instructions cannot take global variable immediates)

llvm-svn: 127895
2011-03-18 19:24:28 +00:00
Anders Carlsson 9583f794c3 Use the newly added FileManager::getNoncachedStatValue when trying to determine if any files in the preamble have changed.
llvm-svn: 127894
2011-03-18 19:23:38 +00:00
Anders Carlsson 5e36840562 Add FileManager::getNoncachedStatValue, which will resolve relative paths against the working directory specified in the file system options.
llvm-svn: 127893
2011-03-18 19:23:19 +00:00
Jim Grosbach 486e57f694 Add llvm-rtdyld support for loading 32-bit code.
Factor out the 64-bit specific bits into a helper function and add an
equivalent that loads the 32-bit sections. This allows using llvm-rtdyld on ARM.

llvm-svn: 127892
2011-03-18 18:54:32 +00:00
Jim Grosbach 806d507b0f setExecutable() should default to success if there's nothing custom for it.
llvm-svn: 127891
2011-03-18 18:51:03 +00:00
Anders Carlsson c30dcecb5c Correctly store and keep track of the FileSystemOptions in ASTUnit and in clang_codeCompleteAt.
llvm-svn: 127890
2011-03-18 18:22:40 +00:00
Owen Anderson eb4b63d66e Thumb2 PC-relative loads require a fixup rather than just an immediate.
llvm-svn: 127888
2011-03-18 17:42:55 +00:00
Oscar Fuentes 9d8ffa9dba Update list of link components for llvm-rtdyld.
llvm-svn: 127887
2011-03-18 17:27:04 +00:00
Jim Grosbach 4d5284b44b Naming conventional tidy up.
llvm-svn: 127886
2011-03-18 17:24:21 +00:00
Jim Grosbach 0072cdbc50 MachO file loader and execution utility.
Add a bone-simple utility to load a MachO object into memory, look for
a function (main) in it, and run that function directly. This will be used
as a test and development platform for MC-JIT work regarding symbol resolution,
dynamic lookup, etc..

Code by Daniel Dunbar.

llvm-svn: 127885
2011-03-18 17:11:39 +00:00
Andrew Trick 1c4b42d00f Avoid creating canonical induction variables for non-native types.
For example, on 32-bit architecture, don't promote all uses of the IV
to 64-bits just because one use is a 64-bit cast.
Alternate implementation of the patch by Arnaud de Grandmaison.

llvm-svn: 127884
2011-03-18 16:50:32 +00:00
Jim Grosbach 6e31408af1 Tidy up.
llvm-svn: 127883
2011-03-18 16:39:36 +00:00
Stephen Canon 5abb5c14c4 Carefully written implementations of the 32-bit integer divide and modulus functions for ARM. These are still using a naive digit-by-digit algorithm, but the core loop has been carefully written.
llvm-svn: 127882
2011-03-18 16:35:02 +00:00