Commit Graph

136017 Commits

Author SHA1 Message Date
Richard Smith 5a1104bd3a DR1472: A reference isn't odr-used if it has preceding initialization,
initialized by a reference constant expression.

Our odr-use modeling still needs work here: we don't yet implement the 'set of
potential results of an expression' DR.

llvm-svn: 166361
2012-10-20 01:38:33 +00:00
Chad Rosier 3017a06c8f [ms-inline asm] Rename AsmOpRewrite to just AsmRewrite to be more generic. No functional change intended.
llvm-svn: 166360
2012-10-20 01:02:45 +00:00
Argyrios Kyrtzidis 73ccdb9c15 When associating file ranges of macro arguments with their
macro expansion ranges, make sure to check all the FileID
entries that are contained in the spelling range of the
expansion for the macro argument.

Fixes rdar://12537982

llvm-svn: 166359
2012-10-20 00:51:32 +00:00
Chad Rosier 03c20e83b8 [ms-inline asm] Update test case for r166357.
llvm-svn: 166358
2012-10-20 00:47:32 +00:00
Chad Rosier eda70b3451 [ms-inline asm] If the state of the parser is ignore, then don't parse the
inline assembly.  Also make sure the remove the ignored statements from the IR.

llvm-svn: 166357
2012-10-20 00:47:08 +00:00
Sean Callanan 575a4545de Improved logging for the SBTarget's launching
and attaching APIs.

llvm-svn: 166356
2012-10-20 00:21:31 +00:00
Sean Callanan ae99b0b3cc Fixed the iOS simulator platform:
- Fixed a crash when the executable module
  couldn't be found.
- Fixed a problem that made it impossible
  to attach to processes in the simulator
  using the SBTarget::Attach.

llvm-svn: 166355
2012-10-20 00:19:59 +00:00
Nadav Rotem 550f7f7e19 LoopVectorize: Keep the IRBuilder on the stack.
llvm-svn: 166354
2012-10-19 23:27:19 +00:00
Chad Rosier 4e11eec116 [ms-inline asm] Test case for r166349 and r166352.
llvm-svn: 166353
2012-10-19 23:16:17 +00:00
Chad Rosier ce09f6b9ef [ms-inline asm] Continue parsing even when we're in an ignore block.
llvm-svn: 166352
2012-10-19 23:15:00 +00:00
Nadav Rotem 4f7f72702b Vectorizer: Add support for loop reductions.
For example:

  for (i=0; i<n; i++)
   sum += A[i] +  B[i] + i;

llvm-svn: 166351
2012-10-19 23:05:40 +00:00
Shuxin Yang 1479fcdef1 1. Remove noreturn attribute from __builtin_debugtrap().
(The change at Clang side was committed in r166345)

2. Cosmetic change in order to conform to coding standards. 

llvm-svn: 166350
2012-10-19 23:00:20 +00:00
Chad Rosier f1f6a72901 [ms-inline asm] Reset the opcode prior to parsing a statement.
llvm-svn: 166349
2012-10-19 22:57:33 +00:00
Michael J. Spencer 66e2b20d39 [Options] Make Option non clang specific.
llvm-svn: 166348
2012-10-19 22:37:06 +00:00
Michael J. Spencer fc790901d2 [Options] make Option a value type.
llvm-svn: 166347
2012-10-19 22:36:40 +00:00
Greg Clayton 1d19a2f253 <rdar://problem/12491387>
Added commands to the KDP plug-in that allow sending raw commands through the KDP protocol. You specify a command byte and a payload as ASCII hex bytes, and the packet is created with a valid header/sequenceID/length and sent. The command responds with a raw ASCII hex string that contains all bytes in the reply including the header.

An example of sending a read register packet for the GPR on x86_64:

(lldb) process plugin packet send --command 0x07 --payload 0100000004000000

llvm-svn: 166346
2012-10-19 22:22:57 +00:00
Shuxin Yang 38860baad0 remove noreturn attribute from __builtin_debugtrap
llvm-svn: 166345
2012-10-19 22:21:42 +00:00
Akira Hatanaka 0c7d131a7b [mips] Use 64-bit registers to return an sret pointer if target ABI is N64.
llvm-svn: 166344
2012-10-19 22:11:40 +00:00
Eric Christopher 5d7e15edc5 Grammar-o.
llvm-svn: 166343
2012-10-19 22:10:54 +00:00
Akira Hatanaka 90131ac26c [mips] Add code to do tail call optimization.
Currently, it is enabled only if option "enable-mips-tail-calls" is given and
all of the callee's arguments are passed in registers.

llvm-svn: 166342
2012-10-19 21:47:33 +00:00
Akira Hatanaka 59a32e91f9 [mips] Fix TAILCALL's operand node type.
llvm-svn: 166341
2012-10-19 21:30:15 +00:00
Nadav Rotem 4dc976fbcb revert r166264 because the LTO build is still failing
llvm-svn: 166340
2012-10-19 21:28:43 +00:00
Akira Hatanaka c046243488 [mips] Delete MipsFunctionInfo::MaxCallFrameSize which is no longer used.
llvm-svn: 166339
2012-10-19 21:18:38 +00:00
Akira Hatanaka d03d68a3ba [mips] Add tail call instructions.
llvm-svn: 166338
2012-10-19 21:14:34 +00:00
Akira Hatanaka 0c5e357d87 [mips] Make the branch nodes used in jump instructions a template parameter.
llvm-svn: 166337
2012-10-19 21:11:03 +00:00
Akira Hatanaka 91318df0cc Add node and enum for mips tail call.
llvm-svn: 166318
2012-10-19 20:59:39 +00:00
Chad Rosier 81bf0e81e0 [ms-inline asm] Update testcase for r166316.
llvm-svn: 166317
2012-10-19 20:57:37 +00:00
Chad Rosier 0f48c55e70 [ms-inline asm] Have the TargetParser callback to Sema to determine the size of
a memory operand.  Retain this information and then add the sizing directives
to the IR.  This allows the backend to do proper instruction selection.

llvm-svn: 166316
2012-10-19 20:57:14 +00:00
Greg Clayton 66763eed3c Change the name of the variable used to detect if we are loading kexts to "load-kexts" instead of "disable-kext-loading" since the value is a boolean. This was requested by the person who requested the feature. It now defaults to true:
(lldb) settings show plugin.dynamic-loader.darwin-kernel.load-kexts
plugin.dynamic-loader.darwin-kernel.load-kexts (boolean) = true

llvm-svn: 166315
2012-10-19 20:53:18 +00:00
Michael Liao 14c43496c4 Add 'IntrNoReturn' for longjmp intrinsics
llvm-svn: 166314
2012-10-19 20:43:54 +00:00
Benjamin Kramer 317d6c621d SimplifyLibcalls: The return value of ffsll is always i32, even when the input is zero.
Fixes PR13028.

llvm-svn: 166313
2012-10-19 20:43:44 +00:00
Chad Rosier 14e0bb54a5 [ms-inline asm] Revert accidental commit. Sorry for the churn.
llvm-svn: 166312
2012-10-19 20:38:09 +00:00
Eli Friedman 92125c474a Pretty-print a ParenListExpr in a variable initializer correctly. Patch by Grzegorz Jablonski.
llvm-svn: 166311
2012-10-19 20:36:44 +00:00
Chad Rosier 46d8fc9d6b [ms-inline asm] Set the SemaCallback in the TargetAsmParser.
llvm-svn: 166310
2012-10-19 20:36:37 +00:00
Micah Villmow 8bbb758f37 Fix a build error for ocaml bindings that was introduced with the TargetData --> DataLayout changes.
llvm-svn: 166309
2012-10-19 20:36:22 +00:00
Chad Rosier 7a05864b48 [ms-inline asm] Add a MCAsmParserSemaCallback to the TargetAsmParser.
llvm-svn: 166308
2012-10-19 20:35:42 +00:00
Daniel Dunbar a3d9cabf8f lit: Rename the valgrind leaks feature to match what is currently used
(vg_leak).

llvm-svn: 166306
2012-10-19 20:29:30 +00:00
Daniel Dunbar a3514551a1 lit: Remove support for XTARGET.
- The XTARGET feature (inherited from old DG tests) was just confusing (and
   barely ever used). The same effect can now be achieved with a combination of
   the more useful REQUIRES and XFAIL.

llvm-svn: 166305
2012-10-19 20:29:27 +00:00
Daniel Dunbar 1999294b86 tests: Fix two tests to just use -triple instead of XFAIL+XTARGET.
llvm-svn: 166304
2012-10-19 20:28:44 +00:00
Daniel Dunbar 519a349c8a lit: Add 'valgrind' and 'valgrind-leaks' features when valgrind is used.
- These can be used with the XFAIL options.

llvm-svn: 166303
2012-10-19 20:12:00 +00:00
Daniel Dunbar 37c4275a92 tests: Stop mangling '-vg' into the triple, we don't use this currently.
- Also, lit is going to get a valgrind feature, instead.

llvm-svn: 166302
2012-10-19 20:11:56 +00:00
Daniel Dunbar fc6bd5cbda tests: Stop mangling '-vg' into the triple, we don't use this currently.
- Also, lit is going to get a valgrind feature, instead.

llvm-svn: 166301
2012-10-19 20:11:46 +00:00
Shuxin Yang cdde059a34 This patch is to fix radar://8426430. It is about llvm support of __builtin_debugtrap()
which is supposed to consistently raise SIGTRAP across all systems. In contrast,
__builtin_trap() behave differently on different systems. e.g. it raises SIGTRAP on ARM, and
SIGILL on X86. The purpose of __builtin_debugtrap() is to consistently provide "trap"
functionality, in the mean time preserve the compatibility with on gcc on __builtin_trap().

  The X86 backend is already able to handle debugtrap(). This patch is to:
  1) make front-end recognize "__builtin_debugtrap()" (emboddied in the one-line change to Clang).
  2) In DAG legalization phase, by default, "debugtrap" will be replaced with "trap", which
     make the __builtin_debugtrap() "available" to all existing ports without the hassle of
     changing their code.
  3) If trap-function is specified (via -trap-func=xyz to llc), both __builtin_debugtrap() and
     __builtin_trap() will be expanded into the function call of the specified trap function.
    This behavior may need change in the future.

  The provided testing-case is to make sure 2) and 3) are working for ARM port, and we
already have a testing case for x86. 

llvm-svn: 166300
2012-10-19 20:11:16 +00:00
Daniel Dunbar aa437df90a IRgen: Initialize TargetLoweringInfo with a triple.
- We create two TargetLoweringInfo instances for different pass managers, and
   they weren't consistent (the one for codegen didn't have the right info). I'm
   not sure this mattered anywhere in practice.

llvm-svn: 166299
2012-10-19 20:10:10 +00:00
Shuxin Yang 57cc6aff5e add __builtin_debugtrap
llvm-svn: 166298
2012-10-19 20:09:33 +00:00
Jason Molenda 3929249281 Remove -w write flag to watch set var from tutorial.html.
Fix one gdb example that had an "(lldb)" prompt in the lldb/gdb page.

llvm-svn: 166297
2012-10-19 19:52:12 +00:00
David Blaikie 82d3ab9225 Clarify wording of -Wshift-op-parentheses.
Suggestion from Matt Beaumont-Gay reviewing r165283.

llvm-svn: 166296
2012-10-19 18:26:06 +00:00
Greg Clayton 468ea4eb9d Rename "macosx-kernel" to "darwin-kernel" to match the filenames before anyone starts using the settings for this plug-in.
llvm-svn: 166295
2012-10-19 18:14:47 +00:00
Greg Clayton e8cd0c9859 Added the infrastructure necessary for plug-ins to be able to add their own settings instead of having settings added to existing ones. In particular "target.disable-kext-loading" was added to "target" where it should actually be specific to the the dynamic loader plugin. Now the plug-in manager has the ability to create settings at the root level starting with "plugin". Each plug-in type can add new sub dictionaries, and then each plug-in can register a setting dictionary under its own short name. For example the DynamicLoaderDarwinKernel plug-in now registers a setting dictionary at:
plugin
    dynamic-loader
        macosx-kernel
            (bool) disable-kext-loading
            
To settings can be set using:

(lldb) settings set plugin.dynamic-loader.macosx-kernel.disable-kext-loading true

I currently only hooked up the DynamicLoader plug-ins, but the code is very easy to duplicate when and if we need settings for other plug-ins.

llvm-svn: 166294
2012-10-19 18:02:49 +00:00
Chad Rosier db97454f8e [ms-inline asm] Set the MCTargetAsmParser as paring MS-style inline asm.
llvm-svn: 166293
2012-10-19 17:58:45 +00:00