Douglas Gregor
d225fa05bd
Cope with finding the "instantiated" declaration when we are
...
type-checking within a template definition. In this case, the
"instantiated" declaration is just the declaration itself, found
within the current instantiation. Fixes PR6239.
llvm-svn: 95442
2010-02-05 22:40:03 +00:00
Chris Lattner
175629608e
print encodings like this:
...
pslld 69, %mm3 ## encoding: [0x0f,0xf2,0x1c,0x25,0x45,0x00,0x00,0x00]
instead of like this:
pslld 69, %mm3 ## encoding: [0x0f,0xf2,0x1c,0x25,0x45,0000,0000,0000]
this only affects 0.
llvm-svn: 95441
2010-02-05 22:20:08 +00:00
Chris Lattner
58827ff98e
port X86InstrInfo::determineREX over to the new encoder.
...
llvm-svn: 95440
2010-02-05 22:10:22 +00:00
Jakob Stoklund Olesen
916f48a054
Teach SimplifyCFG about magic pointer constants.
...
Weird code sometimes uses pointer constants other than null. This patch
teaches SimplifyCFG to build switch instructions in those cases.
Code like this:
void f(const char *x) {
if (!x)
puts("null");
else if ((uintptr_t)x == 1)
puts("one");
else if (x == (char*)2 || x == (char*)3)
puts("two");
else if ((intptr_t)x == 4)
puts("four");
else
puts(x);
}
Now becomes a switch:
define void @f(i8* %x) nounwind ssp {
entry:
%magicptr23 = ptrtoint i8* %x to i64 ; <i64> [#uses=1]
switch i64 %magicptr23, label %if.else16 [
i64 0, label %if.then
i64 1, label %if.then2
i64 2, label %if.then9
i64 3, label %if.then9
i64 4, label %if.then14
]
Note that LLVM's own DenseMap uses magic pointers.
llvm-svn: 95439
2010-02-05 22:03:18 +00:00
Chris Lattner
9c9453e582
wire up 64-bit MCCodeEmitter.
...
llvm-svn: 95438
2010-02-05 21:51:35 +00:00
Chris Lattner
86bd194234
really kill off the last MRMInitReg inst, remove logic from encoder.
...
llvm-svn: 95437
2010-02-05 21:34:18 +00:00
John McCall
ab26cfa58d
Standardize the parsing of function type attributes in a way that
...
follows (as conservatively as possible) gcc's current behavior: attributes
written on return types that don't apply there are applied to the function
instead, etc. Only parse CC attributes as type attributes, not as decl attributes;
don't accepet noreturn as a decl attribute on ValueDecls, either (it still
needs to apply to other decls, like blocks). Consistently consume CC/noreturn
information throughout codegen; enforce this by removing their default values
in CodeGenTypes::getFunctionInfo().
llvm-svn: 95436
2010-02-05 21:31:56 +00:00
Chris Lattner
e96d534ce0
lower the last of the MRMInitReg instructions in MCInstLower.
...
llvm-svn: 95435
2010-02-05 21:30:49 +00:00
Ted Kremenek
31e7f0f293
Add guard in RewriteObjC::HandleTopLevelSingleDecl() to not do
...
anything when Sema has issued an error. This matches the behavior in
RewriteObjC::HandleTranslationUnit().
llvm-svn: 95434
2010-02-05 21:28:51 +00:00
Chris Lattner
90916287ed
teach X86MCInstLower to lower the MOV32r0 and MOV8r0
...
pseudo instructions.
llvm-svn: 95433
2010-02-05 21:21:06 +00:00
Chris Lattner
fd7976a432
genericize helpers, use them for MOV16r0/MOV64r0
...
llvm-svn: 95432
2010-02-05 21:15:57 +00:00
Chris Lattner
340b542f8b
factor code better in X86MCInstLower::Lower, teach it to
...
lower the SETB* instructions.
llvm-svn: 95431
2010-02-05 21:13:48 +00:00
Douglas Gregor
a643780483
Revert r95393, which broke Clang's self-host.
...
llvm-svn: 95430
2010-02-05 21:10:36 +00:00
Douglas Gregor
c90dedbda0
Oops, thanks Clang
...
llvm-svn: 95429
2010-02-05 21:07:53 +00:00
Charles Davis
2b2864c436
Convert this test to FileCheck instead of grepping LLVM IR.
...
llvm-svn: 95428
2010-02-05 20:45:48 +00:00
Douglas Gregor
a16b0cae9a
Implement name mangling for template template parameters
...
llvm-svn: 95427
2010-02-05 20:45:00 +00:00
Ted Kremenek
6a93195783
Fix how scan-build finds c++-analyzer to work with checker builds.
...
llvm-svn: 95425
2010-02-05 20:34:14 +00:00
Daniel Dunbar
9c4e4651d5
IRgen: A few more ConvertType cleanups.
...
llvm-svn: 95423
2010-02-05 20:02:42 +00:00
Douglas Gregor
b9397108c5
Fix two issues with the substitution of template template parameters
...
when instantiating the declaration of a member template:
- Only check if the have a template template argument at a specific position
when we already know that we have template arguments at that level;
otherwise, we're substituting for a level-reduced template template
parameter.
- When trying to find an instantiated declaration for a template
template parameter, look into the instantiated scope. This was a
typo, where we had two checks for TemplateTypeParmDecl, one of
which should have been a TemplateTemplateParmDecl.
With these changes, tramp3d-v4 passes -fsyntax-only.
llvm-svn: 95421
2010-02-05 19:54:12 +00:00
Chris Lattner
64ffd11d49
fix logical-select to invoke filecheck right, and fix hte instcombine
...
xform it is checking to actually pass. There is no need to match
m_SelectCst<0, -1> since instcombine canonicalizes that into not(sext).
Add matches for sext(not(x)) in addition to not(sext(x)).
llvm-svn: 95420
2010-02-05 19:53:02 +00:00
Daniel Dunbar
d0bc7b9d13
IRgen: Factor out EmitAggExprToLValue.
...
llvm-svn: 95416
2010-02-05 19:38:31 +00:00
Chris Lattner
89f7dfff21
implement the rest of the encoding types.
...
llvm-svn: 95414
2010-02-05 19:37:31 +00:00
Chris Lattner
503243559a
move functions for decoding X86II values into the X86II namespace.
...
llvm-svn: 95410
2010-02-05 19:24:13 +00:00
Dan Gohman
4739e41ce9
Implement releaseMemory in CodeGenPrepare and free the BackEdges
...
container data. This prevents it from holding onto dangling
pointers and potentially behaving unpredictably.
llvm-svn: 95409
2010-02-05 19:24:11 +00:00
Chris Lattner
342762fdba
constant propagate a method away.
...
llvm-svn: 95408
2010-02-05 19:20:30 +00:00
Dan Gohman
8abb67df63
Use a SmallSetVector instead of a SetVector; this code showed up as a
...
malloc caller in a profile.
llvm-svn: 95407
2010-02-05 19:20:15 +00:00
Fariborz Jahanian
df506b934e
Fix a code gen bug accessing 'isa' field via a message call
...
(Fixes radar 7609722).
llvm-svn: 95406
2010-02-05 19:18:30 +00:00
Chris Lattner
b8d375fd21
change getSizeOfImm and getBaseOpcodeFor to just take
...
TSFlags directly instead of a TargetInstrDesc.
llvm-svn: 95405
2010-02-05 19:16:26 +00:00
Douglas Gregor
7df89f5d18
When we're parsing an expression that may have looked like a
...
declaration, we can end up with template-id annotation tokens for
types that have not been converted into type annotation tokens. When
this is the case, translate the template-id into a type and parse as
an expression.
llvm-svn: 95404
2010-02-05 19:11:37 +00:00
Chris Lattner
37166eb419
add some more encodings.
...
llvm-svn: 95403
2010-02-05 19:04:37 +00:00
Eric Christopher
04371b4f12
Remove this code for now. I have a better idea and will rewrite with
...
that in mind.
llvm-svn: 95402
2010-02-05 19:04:06 +00:00
Daniel Dunbar
8848175547
IRgen: Fix some CreateTempAlloca calls to use ConvertTypeForMem when that is
...
conceptually correct. Review appreciated (Chris, Eli, Anders).
llvm-svn: 95401
2010-02-05 18:56:49 +00:00
Anders Carlsson
cb86e1088a
Fix the bug that was breaking self-host, and re-land the static ctor fixes.
...
llvm-svn: 95400
2010-02-05 18:38:45 +00:00
Charles Davis
5a5473f0f8
Now that we store calling conventions in the types, use them instead of
...
getting the calling convention from the target function, which may or may not
exist. Fixes PR5280.
llvm-svn: 95399
2010-02-05 18:13:10 +00:00
Jeffrey Yasskin
03a3df1235
Make lit's gtest support honor config.environment.
...
llvm-svn: 95398
2010-02-05 18:09:19 +00:00
Johnny Chen
a778db9a91
VMOVRRD and VMOVDRR both have Inst{7-6} = 0b00.
...
llvm-svn: 95397
2010-02-05 18:04:58 +00:00
Fariborz Jahanian
73587761e2
Removed non-essential header file from test.
...
llvm-svn: 95396
2010-02-05 18:04:36 +00:00
Douglas Gregor
96e578d29d
Initial skeleton of an AST "importer", which will take AST elements from
...
one context and import them into another context, merging them
according to language-specific rules. This is a skeleton. It doesn't
work, it isn't testable, but I want it in version control.
llvm-svn: 95395
2010-02-05 17:54:41 +00:00
Charles Davis
e4e604b5d6
Testing, 1, 2, 3...
...
Also make the comments I added in r95291 consistent.
llvm-svn: 95394
2010-02-05 17:53:51 +00:00
Daniel Dunbar
363589bded
IRgen: Use hasAggregateLLVMType instead of isSingleValueType() for cases that
...
need to deal with aggregates specially; this is consistent with the rest of IRgen.
Also, simplify EmitParmDecl and don't worry about using Decl::getNameAsString.
llvm-svn: 95393
2010-02-05 17:51:33 +00:00
Fariborz Jahanian
314333847e
Fixes a minor rewriter bug messaging inside a function call.
...
Fixes radar 7617047.
llvm-svn: 95392
2010-02-05 17:48:10 +00:00
Fariborz Jahanian
a7e1dcdc0e
Some clean up of replacement text API no longer needed by
...
my recent changes.
llvm-svn: 95391
2010-02-05 16:43:40 +00:00
Jeffrey Yasskin
31faefff92
Move --march, --mcpu, and --mattr from JIT/TargetSelect.cpp to lli.cpp.
...
llc.cpp also defined these flags, meaning that when I linked all of LLVM's
libraries into a single shared library, llc crashed on startup with duplicate
flag definitions. This patch passes them through the EngineBuilder into
JIT::selectTarget().
llvm-svn: 95390
2010-02-05 16:19:36 +00:00
Douglas Gregor
af77cd220a
Revert r95363 and r95375, which broke self-host.
...
llvm-svn: 95389
2010-02-05 16:18:08 +00:00
Bill Wendling
994da1a479
Make test more fucused eliminating extraneous bits.
...
llvm-svn: 95384
2010-02-05 11:21:05 +00:00
Douglas Gregor
0ab7af6c28
A dependent initializer with zero arguments should return a NULL
...
initializer (for no initialization) rather than a ParenListExpr with
zero arguments in it.
llvm-svn: 95382
2010-02-05 07:56:11 +00:00
Chandler Carruth
bc50da6360
Revert the unused TST_pixel entry from r95335 as it is not listed in the Sema
...
switch, triggering warnings.
llvm-svn: 95381
2010-02-05 07:38:55 +00:00
Douglas Gregor
8c702534cb
Default function arguments for function template specializations
...
always come from the primary template, so gather the instantiation
template arguments from the primary template.
llvm-svn: 95380
2010-02-05 07:33:43 +00:00
Daniel Dunbar
4e9083260b
Tweak inliner thresholds to match llvm-gcc, see r95321.
...
llvm-svn: 95379
2010-02-05 07:32:37 +00:00
Daniel Dunbar
675ae27e37
MC: Change default comment column to 40 characters.
...
llvm-svn: 95378
2010-02-05 07:32:18 +00:00