Commit Graph

120845 Commits

Author SHA1 Message Date
Akira Hatanaka 01d3c42f90 Modify MipsFrameLowering::emitPrologue and emitEpilogue.
- Use MipsAnalyzeImmediate to expand immediates that do not fit in 16-bit.
- Change the types of variables so that they are sufficiently large to handle
  64-bit pointers.
- Emit instructions to set register $28 in a function prologue after
  instructions which store callee-saved registers have been emitted. 
 

llvm-svn: 148917
2012-01-25 04:12:04 +00:00
Akira Hatanaka d1d4b3efcf Modify MipsRegisterInfo::eliminateFrameIndex to use MipsAnalyzeImmediate to
expand offsets that do not fit in the 16-bit immediate field of load and store
instructions. Also change the types of variables so that they are sufficiently
large to handle 64-bit pointers.

llvm-svn: 148916
2012-01-25 03:55:10 +00:00
Argyrios Kyrtzidis 34172b83d6 In TreeTransform<Derived>::TransformBlockExpr, call ActOnBlockError for errors,
patch by Dmitri Gribenko.

llvm-svn: 148915
2012-01-25 03:53:04 +00:00
Craig Topper 3ad5bc019a Merge intrinsic pattern and no pattern versions of VCVTSD2SI intruction definitions. Matches non-AVX version of same instructions.
llvm-svn: 148914
2012-01-25 03:52:09 +00:00
Rafael Espindola f47efbc07d -fvisibility-inlines-hidden is a c++ only option.
Thanks to Peter Collingbourne for noticing it.

llvm-svn: 148913
2012-01-25 03:39:26 +00:00
NAKAMURA Takumi 6c421ea484 MipsAnalyzeImmediate.h: Fix to add DataTypes.h for msvc.
inttypes.h is not supplied in msvc.

llvm-svn: 148912
2012-01-25 03:34:41 +00:00
Greg Clayton 9431f01f65 Handle 's' packets correctly when disassembling GDB packet output.
llvm-svn: 148911
2012-01-25 03:20:34 +00:00
Nick Lewycky ff50962534 Fix assert("msg"). Fix unused-variable warnings complaining about VT used only
in asserts.

llvm-svn: 148910
2012-01-25 03:20:12 +00:00
NAKAMURA Takumi 96a21dcea3 Target/Mips: Unbreak CMake build.
llvm-svn: 148909
2012-01-25 03:15:46 +00:00
Akira Hatanaka 86d5fadd57 Lower 64-bit immediates using MipsAnalyzeImmediate that has just been added.
Add a test case to show fewer instructions are needed to load an immediate
with the new way of loading immediates.

llvm-svn: 148908
2012-01-25 03:01:35 +00:00
Argyrios Kyrtzidis 5a25297c5e Revert 148902 which was part of 148901 which was reverted in r148906.
Original log:
 use the new ConstantVector::getSplat method where it makes sense.

llvm-svn: 148907
2012-01-25 02:58:12 +00:00
Argyrios Kyrtzidis 939b7a0b7c Revert r148901 because it crashes llvm tests.
Original log:
    Introduce a new ConstantVector::getSplat constructor function to
    simplify a really common case.

llvm-svn: 148906
2012-01-25 02:42:41 +00:00
Richard Smith 928be491e0 Fix PR11848: decree that an alias template contains an unexpanded parameter pack
iff its substitution contains an unexpanded parameter pack. This has the effect
that we now reject declarations such as this (which we used to crash when
expanding):

  template<typename T> using Int = int;
  template<typename ...Ts> void f(Int<Ts> ...ints);

The standard is inconsistent on how this case should be treated.

llvm-svn: 148905
2012-01-25 02:14:59 +00:00
Eric Christopher 000b14e796 Refactor the record decl forward declaration code a bit.
llvm-svn: 148904
2012-01-25 02:06:59 +00:00
Eric Christopher 980df5d7ec Typo.
llvm-svn: 148903
2012-01-25 02:06:52 +00:00
Chris Lattner c558d7d176 use the new ConstantVector::getSplat method where it makes sense.
llvm-svn: 148902
2012-01-25 02:06:10 +00:00
Chris Lattner 9fe7dd872b Introduce a new ConstantVector::getSplat constructor function to
simplify a really common case.

llvm-svn: 148901
2012-01-25 01:53:58 +00:00
Akira Hatanaka ff36fd3de3 Add class MipsAnalyzeImmediate which comes up with an instruction sequence to
load an immediate. 

llvm-svn: 148900
2012-01-25 01:43:36 +00:00
Johnny Chen f41385f9be Add some more test cases for command completion:
o complete an unambiguous option
  o complete/list the available option values
  o complete/list the candidate command names

llvm-svn: 148899
2012-01-25 01:37:36 +00:00
Chris Lattner 8a3df5495a Remove the Type::getNumElements() method, which is only called in 4 places,
did something extremely surprising, and shadowed actually useful 
implementations that had completely different behavior.

llvm-svn: 148898
2012-01-25 01:32:59 +00:00
Chris Lattner 9be59599b3 Use the right method to get the # elements in a CDS.
llvm-svn: 148897
2012-01-25 01:27:20 +00:00
Nick Lewycky dd99ec8ccf With a little more work in the tentative parse determining whether a statement
is a declaration-stmt or an expression, we can discern a subset of cases where
the user erred in omitting the typename keyword before a dependent type name.
Fixes PR11358!

llvm-svn: 148896
2012-01-25 01:19:14 +00:00
Douglas Gregor d1f01d79e5 Introduce a generation number for selector lookups in the global
method pool, so that we don't perform the same lookups into the same
PCH/module file repeatedly.

llvm-svn: 148895
2012-01-25 01:14:32 +00:00
Douglas Gregor 63db9717a5 Only try to import a definition if there is an definition to import.
llvm-svn: 148894
2012-01-25 01:13:20 +00:00
Eli Friedman a59b1907cc Make sure we correctly treat __is_convertible_to as an unevaluated context. PR11833.
llvm-svn: 148893
2012-01-25 01:05:57 +00:00
Jean-Daniel Dupas 9aa95b16e1 Fix test on cygwin (where va_list expands to a different type)
llvm-svn: 148892
2012-01-25 01:02:26 +00:00
Douglas Gregor 70f449bf41 Whenever Sema attempts to look in the global method pool, try to load
additional data from the external Sema source. This properly copes
with modules that are imported after we have already searched in the
global method pool for a given selector. For PCH, it's a slight
pessimization to be fixed soon.

llvm-svn: 148891
2012-01-25 00:59:09 +00:00
Jean-Daniel Dupas 3b8dfa069b Add "multiple format attributes" support on block.
llvm-svn: 148890
2012-01-25 00:55:11 +00:00
Douglas Gregor e171601ff6 Rework the external Sema source's ReadMethodPool() so that it doesn't
return pre-built lists. Instead, it feeds the methods it deserializes
to Sema so that Sema can unique them, which keeps the chains shorter.

llvm-svn: 148889
2012-01-25 00:49:42 +00:00
Ted Kremenek 44d2973b6f Reduce peak memory usage of the static analyzer on sqlite3 (when using inlining) by 30%.
This is accomplished by periodically reclaiming nodes in the graph.  This was an optimization
done before the CFG was linearized, but the CFG linearization destroyed that optimization since each
freshly created node couldn't be reclaimed and we only looked at a window of nodes created between
each ProcessStmt.  This optimization can be reclaimed my merely expanding the window to N number of nodes.

llvm-svn: 148888
2012-01-25 00:35:05 +00:00
Fariborz Jahanian aa7b9aa10d arc migrator: Provide infrastructure to add options
specific to migrator. Use its first option to
warn migrating from GC to arc when 
NSAllocateCollectable/NSReallocateCollectable is used.
// rdar://10532541

llvm-svn: 148887
2012-01-25 00:20:29 +00:00
Douglas Gregor c454afedff Factor out the addition of a method into the global method pool, and
teach it to always add the new method at the *end* of the list rather
than as the second element in the list.

llvm-svn: 148886
2012-01-25 00:19:56 +00:00
Ted Kremenek 9b1f3d46d0 Fix NSLog format string checking for %@.
llvm-svn: 148885
2012-01-25 00:04:09 +00:00
Jim Grosbach 086cbfac7d NEON VLD4(all lanes) assembly parsing and encoding.
llvm-svn: 148884
2012-01-25 00:01:08 +00:00
Jim Grosbach ccb6d55dae Tidy up. Rename VLD4DUP patterns for consistency.
llvm-svn: 148883
2012-01-24 23:47:07 +00:00
Jim Grosbach b78403ce48 NEON VLD3(all lanes) assembly parsing and encoding.
llvm-svn: 148882
2012-01-24 23:47:04 +00:00
Talin 77c4ff2182 Additional methods for SmallString.
llvm-svn: 148881
2012-01-24 23:43:59 +00:00
Howard Hinnant abc770690a By changing all of the throw() specs to noexcept I've been able to compile and link all of the source files into a dylib. Prior to this substitution the changed functions were calling __cxa_call_unexpected which isn't implemented yet. However in none of these cases do we actaully want __cxa_call_unexpected to be called. Primative buildit script added.
llvm-svn: 148880
2012-01-24 23:42:30 +00:00
Jakob Stoklund Olesen 1b8e437ab6 Set correct <def,undef> flags when lowering REG_SEQUENCE.
A REG_SEQUENCE instruction is lowered into a sequence of partial defs:

  %vreg7:ssub_0<def,undef> = COPY %vreg20:ssub_0
  %vreg7:ssub_1<def> = COPY %vreg2
  %vreg7:ssub_2<def> = COPY %vreg2
  %vreg7:ssub_3<def> = COPY %vreg2

The first def needs an <undef> flag to indicate it is the beginning of
the live range, while the other defs are read-modify-write.  Previously,
we depended on LiveIntervalAnalysis to notice and fix the missing
<def,undef>, but that solution was never robust, it was causing problems
with ProcessImplicitDefs and the lowering of chained REG_SEQUENCE
instructions.

This fixes PR11841.

llvm-svn: 148879
2012-01-24 23:28:42 +00:00
Jakob Stoklund Olesen 66ef9ad33f Use the standard MachineFunction::print() after SlotIndexes.
llvm-svn: 148878
2012-01-24 23:28:38 +00:00
Johnny Chen 5f3bf63cac Fix a typo in the error message of the StopInfoWatchpoint class.
llvm-svn: 148876
2012-01-24 23:19:25 +00:00
Akira Hatanaka d7970f9e4b Sign-extend 32-bit integer arguments when they are passed in 64-bit registers,
which is what N32/64 does.

llvm-svn: 148875
2012-01-24 23:18:43 +00:00
Eli Friedman 946b7b5bc8 Switch PerformImplicitConversion over to use DefaultLvalueConversion for lvalue-to-rvalue conversion.
llvm-svn: 148874
2012-01-24 22:51:26 +00:00
Jean-Daniel Dupas 78536ae5b5 Replace a hack to handle NSLog/NSLogv in sema by declaring them as Library Builtins.
llvm-svn: 148873
2012-01-24 22:32:46 +00:00
Jean-Daniel Dupas 5778cb8e06 Remove trailing slash in front of header name of ObjC builtins.
llvm-svn: 148872
2012-01-24 22:29:27 +00:00
Akira Hatanaka 7e6c195c11 Pass CCState by reference.
llvm-svn: 148871
2012-01-24 22:07:36 +00:00
Sean Callanan 175a0d04b6 Added a mechanism for the IR interpreter to return
an error along with its boolean result.  The
expression parser reports this error if the 
interpreter fails and the expression could not be
run in the target.

llvm-svn: 148870
2012-01-24 22:06:48 +00:00
Akira Hatanaka 77dbd786c8 Pattern for f32 to i64 conversion.
llvm-svn: 148869
2012-01-24 22:05:25 +00:00
Anna Zaks b3d896d333 [analyzer] Add the HTML file to the SATest diagnostic diff.
(Uses the functionality which has been in CmpRuns long before.)

llvm-svn: 148868
2012-01-24 21:57:35 +00:00
Anna Zaks 895c312404 [analyzer] Testing: make diagnostic diffs more informative (add
diagnostic message).

llvm-svn: 148867
2012-01-24 21:57:32 +00:00