Commit Graph

112201 Commits

Author SHA1 Message Date
Nick Lewycky 2e2d75fb97 Fix the build for us -Werror users.
Remove broken emacs mode major notation marking a C++ file as C.
No functionality change.

llvm-svn: 138963
2011-09-01 21:09:04 +00:00
Eli Friedman b053ac7e0c Make isSafeToSpeculativelyExecute() return the right answer for some new instructions. Found by inspection; not sure what practical impact, if any, this has.
llvm-svn: 138962
2011-09-01 21:03:03 +00:00
Howard Hinnant 00d8c245b2 Reimplemented much of <istream> such that single character extractions do not check to see if this is the last character in the stream and thus never set eofbit. This fixes http://llvm.org/bugs/show_bug.cgi?id=10817 . This fix requires a recompiled libc++.dylib to be fully implemented. The recompiled libc++.dylib is ABI compatible with that shipped on Lion.
llvm-svn: 138961
2011-09-01 21:02:45 +00:00
Argyrios Kyrtzidis cbbc0141f6 [arcmt] Fix test/ARCMT/remove-statements.m regression due to
Objective-C method buffering(rdar://10056942)

Turned out the same issue existed for C++ inline methods.

llvm-svn: 138960
2011-09-01 20:53:18 +00:00
Douglas Gregor 7018d5bcfb Teach ASTContext and Preprocessor to hold on to references to the same
LangOptions, rather than making distinct copies of
LangOptions. Granted, LangOptions doesn't actually get modified, but
this will eventually make it easier to construct ASTContext and
Preprocessor before we know all of the LangOptions.

llvm-svn: 138959
2011-09-01 20:23:19 +00:00
Fariborz Jahanian 415e47dd6e default property synthesis is off by default
for now.

llvm-svn: 138958
2011-09-01 20:23:17 +00:00
Douglas Gregor 6ac0b717b4 Make test slightly trickier
llvm-svn: 138957
2011-09-01 19:02:18 +00:00
Benjamin Kramer c032617581 XFAIL this test on arm until the backend is fixed.
llvm-svn: 138955
2011-09-01 18:40:03 +00:00
Benjamin Kramer 0f6ff8cb2b This test depends on cmov being available.
llvm-svn: 138954
2011-09-01 18:40:01 +00:00
Jakob Stoklund Olesen 5dc87d0f4d Permit remat of partial register defs when it is safe.
An instruction may define part of a register where the other bits are
undefined. In that case, it is safe to rematerialize the instruction.
For example:

  %vreg2:ssub_0<def> = VLDRS <cp#0>, 0, pred:14, pred:%noreg, %vreg2<imp-def>

The extra <imp-def> operand indicates that the instruction does not read
the other parts of the virtual register, so a remat is safe.

This patch simply allows multiple def operands for the virtual register.
It is MI->readsVirtualRegister() that determines if we depend on a
previous value so remat is impossible.

llvm-svn: 138953
2011-09-01 18:27:51 +00:00
Jim Grosbach f6d5d60f99 ARM 'rscs' mnemonic is carry-setting 'rsc', not 'rs' with a 'cs' condition code.
llvm-svn: 138952
2011-09-01 18:22:13 +00:00
Bruno Cardoso Lopes f61d1c072e Fix vbroadcast matching logic to early unmatch if the node doesn't have
only one use. Fix PR10825.

llvm-svn: 138951
2011-09-01 18:15:06 +00:00
Greg Clayton f39c67685b Forgot to write out the NULL terminator when putting C string value into
a data using DataEncoder.

Added DataEncoder to the lldb-forward.h file.

llvm-svn: 138950
2011-09-01 18:13:54 +00:00
Greg Clayton 9482865f2a Added a DataEncoder class for the new IR evaluation expression parser so it
can reserve a block of memory and store stuff into it.

llvm-svn: 138949
2011-09-01 18:10:09 +00:00
James Molloy db4ce60328 Fix up r137380 based on post-commit review by Jim Grosbach.
llvm-svn: 138948
2011-09-01 18:02:14 +00:00
Fariborz Jahanian f7a3d4ad15 objective-c: Make auto synthesis of properties the default.
This concludes //rdar://8843851

llvm-svn: 138947
2011-09-01 17:50:05 +00:00
Owen Anderson 35d240f9e8 t2Bcc is allowed to have a predicate without a preceding IT instruction.
llvm-svn: 138946
2011-09-01 17:47:45 +00:00
Jakob Stoklund Olesen e417273fce Revert r138794, "Do not try to rematerialize a value from a partial definition."
The problem is fixed for all register allocators by r138944, so this
patch is no longer necessary.

<rdar://problem/10032939>

llvm-svn: 138945
2011-09-01 17:25:18 +00:00
Jakob Stoklund Olesen 6357fa2f06 Prevent remat of partial register redefinitions.
An instruction that redefines only part of a larger register can never
be rematerialized since the virtual register value depends on the old
value in other parts of the register.

This was fixed for the inline spiller in r138794.  This patch fixes the
problem for all register allocators, and includes a small test case.

<rdar://problem/10032939>

llvm-svn: 138944
2011-09-01 17:18:50 +00:00
Douglas Gregor 4a69c2e6c5 Modules hide macro definitions by default, so that silly things like
include guards don't show up as macro definitions in every translation
unit that imports a module. Macro definitions can, however, be
exported with the intentionally-ugly #__export_macro__
directive. Implement this feature by not even bothering to serialize
non-exported macros to a module, because clients of that module need
not (should not) know that these macros even exist.

llvm-svn: 138943
2011-09-01 17:04:32 +00:00
Francois Pichet 0274487d97 Enable -fdelayed-template-parsing by default on Win32.
I had to force -fno-delayed-template-parsing on some Index tests because delayed template parsing will change the output of some tests.

llvm-svn: 138942
2011-09-01 16:38:08 +00:00
Rafael Espindola 5f344fff08 Fix PR10744 by adding the toolchain path to the regular program path
and doing a simple search. Before we would manually check for the linker
before the -B options were searched.

llvm-svn: 138941
2011-09-01 16:25:49 +00:00
Hans Wennborg ecc25a2812 Add 4.4.6 to GccVersions[] in lib/Driver/ToolChains.cpp.
llvm-svn: 138940
2011-09-01 14:41:39 +00:00
Zhongxing Xu bfb8e2fe6e If size was equal to 0, either NULL or a pointer suitable to be passed to
free() is returned by realloc(). Most code expect NULL.

And we only need to transfer one final ProgramState.

llvm-svn: 138937
2011-09-01 04:53:59 +00:00
Argyrios Kyrtzidis 019f3c2444 Fix "multi-line comment" compiler error.
llvm-svn: 138936
2011-09-01 03:07:11 +00:00
Douglas Gregor 528499bb44 When defining the implicit move assignment operator, don't perform
semantic analysis when taking the address of an xvalue. Instead, just
build the unary operator directly, since it's safe to do so (from the
IRgen and AST perspectives) for any glvalue. Fixes PR10822.

llvm-svn: 138935
2011-09-01 02:09:07 +00:00
Evan Cheng 90da66bb69 Teach MachineLICM reg pressure tracking code to deal with MVT::untyped. Sorry, I can't come up with a small test case. rdar://10043690
llvm-svn: 138934
2011-09-01 01:45:00 +00:00
Bill Wendling 185d377597 Update to new EH scheme.
llvm-svn: 138933
2011-09-01 01:28:25 +00:00
Bill Wendling a617c32745 Resubmit with fix. Properly remove the instructions except for landingpad, which should be removed only when its invokes are.
llvm-svn: 138932
2011-09-01 01:28:11 +00:00
Bill Wendling 9f7cf20e60 Submitted this too early.
llvm-svn: 138931
2011-09-01 01:18:33 +00:00
Bill Wendling 2d1f11f743 Don't DCE the landingpad instruction.
The landingpad instruction can be removed only when its invokes are removed.

llvm-svn: 138930
2011-09-01 01:16:58 +00:00
Jim Ingham 3555b5d717 disassemble with no arguments disassembles at the pc. Also got "disassemble -f" to work, that had gotten broken at some point in the past.
llvm-svn: 138929
2011-09-01 01:11:04 +00:00
Bill Wendling d33e3007fa Update to new EH scheme.
llvm-svn: 138928
2011-09-01 01:08:21 +00:00
Bill Wendling 3b17c1b48d Update to new EH scheme.
llvm-svn: 138927
2011-09-01 01:02:41 +00:00
Argyrios Kyrtzidis 7d847c9fd8 Support importing of ObjC categories from modules.
The initial incentive was to fix a crash when PCH chaining categories
to an interface, but the fix was done in the "modules way" that I hear
is popular with the kids these days.

Each module stores the local chain of categories and we combine them
when the interface is loaded. We also warn if non-dependent modules
introduce duplicate named categories.

llvm-svn: 138926
2011-09-01 00:58:55 +00:00
Bill Wendling e88632d667 Update some tests to the new EH scheme.
llvm-svn: 138925
2011-09-01 00:58:03 +00:00
Andrew Trick 832a6a1909 PreRA scheduler should avoid cloning compares.
Added canClobberReachingPhysRegUse() to handle a particular pattern in
which a two-address instruction could be forced to interfere with
EFLAGS, causing a compare to be unnecessarilly cloned.
Fixes rdar://problem/5875261

llvm-svn: 138924
2011-09-01 00:54:31 +00:00
Bill Wendling b9a899995d Don't forget to add the landingpad and resume instructions to the InstructionList.
This was found via a nightly build of 483.xalancbmk.

llvm-svn: 138923
2011-09-01 00:50:20 +00:00
Jim Grosbach 1d3c137839 Thumb2 assembly parsing and encoding for ADD(immediate).
llvm-svn: 138922
2011-09-01 00:28:52 +00:00
Chandler Carruth eef47ba664 Create a CaretDiagnostic class to hold the logic for emitting
(unsurprisingly) caret diagnostics. This is designed to bring some
organization to the monstrous EmitCaretDiagnostic function, and allow
factoring it more easily and with less mindless parameter passing.

Currently this just lifts the existing function into a method, and
splits off the obviously invariant arguments to be class members. No
functionality is changed, and there are still lots of warts to let
existing code continue functioning as-is. Definitely WIP, more cleanups
to follow.

llvm-svn: 138921
2011-08-31 23:59:23 +00:00
Chandler Carruth 153a7bb35e Sink all of the include stack printing logic into its member function.
llvm-svn: 138920
2011-08-31 23:59:19 +00:00
Anna Zaks 5efad63f57 [analyzer] Revert a regression introduced in r133104(The ARC Migration Tool..) due to a merge error.
llvm-svn: 138919
2011-08-31 23:53:24 +00:00
Chad Rosier 17847ae757 Fixup for functions that return a bool.
llvm-svn: 138918
2011-08-31 23:49:05 +00:00
Fariborz Jahanian b93cd18a82 Test for default property synthesis.
llvm-svn: 138917
2011-08-31 23:32:48 +00:00
Bill Wendling 080f40a49d Reenable test.
llvm-svn: 138916
2011-08-31 23:08:05 +00:00
Bill Wendling 54b91028f0 Revert accidental commit
llvm-svn: 138915
2011-08-31 23:07:46 +00:00
Eli Friedman c472975fd9 Disable this test until Bill fixes it properly.
llvm-svn: 138914
2011-08-31 23:03:30 +00:00
Fariborz Jahanian 97d744bea4 objective-c: this patch (re)introduces objective-c's default property
synthesis. This new feature is currently placed under 
-fobjc-default-synthesize-properties option
and is off by default pending further testing.
It will become the default feature soon. 
// rdar://8843851

llvm-svn: 138913
2011-08-31 22:24:06 +00:00
Jim Grosbach e1995f2566 Static relocation model Thumb jump table interworking.
Make sure the low bit of the PC is set when loading an address directly
for jump tables in static relocation model.

llvm-svn: 138912
2011-08-31 22:23:09 +00:00
Owen Anderson 4af0aa98d5 The asm parser currently selects the wrong encoding for non-conditional Thumb2 branches. However, this exposed a number of situations where the decoder was too permissive in allowing invalid instructions to decode successful. Specify additional fixed bits to close those gaps.
llvm-svn: 138910
2011-08-31 22:00:41 +00:00