Commit Graph

75948 Commits

Author SHA1 Message Date
Chris Lattner 872501b6e0 introduce the MCParsedAsmOperand class.
llvm-svn: 93454
2010-01-14 21:20:55 +00:00
Evan Cheng 8e670ee381 Small tweak to inline cost computation. Ext of i/fcmp results are mostly optimized away in codegen.
llvm-svn: 93453
2010-01-14 21:04:31 +00:00
Chris Lattner 0b534d5969 fix grammaro
llvm-svn: 93452
2010-01-14 21:00:58 +00:00
Anton Korobeynikov 6bedbf1039 long long is 64 bits on msp430
llvm-svn: 93451
2010-01-14 20:22:45 +00:00
Anton Korobeynikov 105682dc96 Remove spurious semicolon.
Patch by Diego Iastrubni!

llvm-svn: 93450
2010-01-14 20:19:51 +00:00
Victor Hernandez 8296da7b56 In debug builds, assert that function-local metadata has only 1 parent function
llvm-svn: 93449
2010-01-14 20:12:34 +00:00
Eric Christopher f3ac066418 Reduce the inlining cost of functions that contain calls to easily,
and frequently optimized functions.

llvm-svn: 93448
2010-01-14 20:12:34 +00:00
John McCall 8cb7a8a39c Pre-emptive bugfixes in the diagnostics code: allow arbitrary punctuation
characters to be escaped and implement a scan-forward function which
properly respects brace nesting.

llvm-svn: 93447
2010-01-14 20:11:39 +00:00
Victor Hernandez 572218b53b Simplify code that chooses when to enumerate function-local metadata operands
llvm-svn: 93446
2010-01-14 19:54:11 +00:00
Ted Kremenek 91df0ec92c Simplify test case. This test case also applies to PR 6013.
llvm-svn: 93444
2010-01-14 19:47:50 +00:00
Victor Hernandez 36aee30dfb Avoid modifying ValueEnumerator's MD ValueList by choosing which function-local MD to write based on the function currently being written
llvm-svn: 93441
2010-01-14 19:38:44 +00:00
Ted Kremenek b9ad45ab60 Associate test case with Bugzilla PR.
llvm-svn: 93440
2010-01-14 19:38:41 +00:00
John McCall 98757030a4 Document the extensions I made to the diagnostics-formatting system yesterday.
llvm-svn: 93439
2010-01-14 19:12:17 +00:00
Jakob Stoklund Olesen 0ca14e4498 ARM "l" constraint for inline asm means R0-R7, also for Thumb2.
This is consistent with llvm-gcc's arm/constraints.md.

Certain instructions (e.g. CBZ, CBNZ) require a low register, even in Thumb2
mode.

llvm-svn: 93436
2010-01-14 18:19:56 +00:00
Douglas Gregor 04b1152aac After dyn_cast'ing, it generally makes sense to check the *output* of
the dyn_cast against NULL rather than the *input*. Fixes PR6025.

llvm-svn: 93435
2010-01-14 18:13:22 +00:00
Devang Patel ea84f59f5c Add comment.
llvm-svn: 93434
2010-01-14 18:06:13 +00:00
Douglas Gregor d2e6a45722 When qualified lookup into the current instantiation fails (because it
finds nothing), and the current instantiation has dependent base
classes, treat the qualified lookup as if it referred to an unknown
specialization. Fixes PR6031.

llvm-svn: 93433
2010-01-14 17:47:39 +00:00
Douglas Gregor fc59ce1ea4 Switch a few callers of MaybeAddResult over to AddResult, when the
declarations we're adding do not need any name-hiding checks.

llvm-svn: 93431
2010-01-14 16:14:35 +00:00
Douglas Gregor 2b8162b7d0 Switch code-completion's ivar lookup over to LookupVisibleDecls,
eliminating yet one more ResultBuilder::MaybeAddResult caller.

llvm-svn: 93430
2010-01-14 16:08:12 +00:00
Douglas Gregor 78a210145b Start migrating code-completion results from
ResultBuilder::MaybeAddResult over to ResultBuilder::AddResult.

llvm-svn: 93429
2010-01-14 16:01:26 +00:00
Douglas Gregor 09bbc651f4 Switch the remaining code completions over to LookupVisibleDecls,
after adding the ability to determine whether our lookup is a
base-class lookup. Eliminate CollectMemberLookupResults, since it is
no longer used (yay).

llvm-svn: 93428
2010-01-14 15:47:35 +00:00
David Chisnall 035ead209f Made ObjC method name mangling match GCC (which does it in a stupid and broken way that can give conflicts on method names containing underscores, but is needed for gdb to work because gdb does not know how to read ObjC class tables and relies on the mangling).
llvm-svn: 93427
2010-01-14 14:08:19 +00:00
Bill Wendling 22fe58e1b9 Use ENABLE_ASSERTIONS throughout.
llvm-svn: 93423
2010-01-14 10:19:55 +00:00
Zhongxing Xu 803ade2532 Fix pr6035.
llvm-svn: 93422
2010-01-14 03:45:06 +00:00
Douglas Gregor 200c99dd1e Move code completion for qualified name lookup (foo::) to
LookupVisibleDecls. Also, a function does not hide another function.

llvm-svn: 93421
2010-01-14 03:35:48 +00:00
John McCall 4700099719 Improve overload diagnostics some more by calling out qualifier mismatches
for special diagnostics.  Unfortunately, the non-overload diagnostics are not
this good.

llvm-svn: 93420
2010-01-14 03:28:57 +00:00
Douglas Gregor a6e2edcc3a Eliminate the code-completion-specifier CollectLookupResults in favor
of the more general LookupVisibleDecls.

llvm-svn: 93419
2010-01-14 03:27:13 +00:00
Douglas Gregor 6ae4c5278c Simplify the code-completion logic for nested-name-specifiers: rather
than traversing visible declarations twice, only perform one traversal
and recognize nested-name-specifiers as special.

llvm-svn: 93418
2010-01-14 03:21:49 +00:00
Dan Gohman dd5286dc63 Fix a codegen abort seen in 483.xalancbmk.
llvm-svn: 93417
2010-01-14 03:08:49 +00:00
Mike Stump 0a7d9305f1 Don't assume a random access iterator, instead just use CFG::iterator.
Thanks Ted.

llvm-svn: 93413
2010-01-14 02:45:29 +00:00
Anders Carlsson 5f9a881e1e Store the address points for constructor vtables directly in the VTT builder, because that's the only time they're needed.
llvm-svn: 93412
2010-01-14 02:29:07 +00:00
Mike Stump 29ce3a3114 Avoid snowballing errors into additional warnings. To do better, we'd
need an error term for the CFG.  I suspect we'll always have to cope
with getCFG returning 0, though, I'd love to see even that possibility
removed.

llvm-svn: 93411
2010-01-14 02:26:52 +00:00
Evan Cheng 37463a7a58 Test for r93409.
llvm-svn: 93410
2010-01-14 02:24:50 +00:00
Victor Hernandez d2b4f36986 Extend testcase to also test llvm.dbg.value intrinsic
llvm-svn: 93408
2010-01-14 02:12:41 +00:00
Victor Hernandez b658d30b91 Now that LLParser, AsmWriter, BitcodeReader, and BitcodeWriter all correctly support function-local metadata, test it.
llvm-svn: 93406
2010-01-14 01:51:28 +00:00
Ted Kremenek e34cbde383 Switch return site to use clang_getNullCursor().
llvm-svn: 93405
2010-01-14 01:51:23 +00:00
Ted Kremenek e1b5525510 Further tweak USR generation by shorting names and distinguish between namespaces and functions.
llvm-svn: 93404
2010-01-14 01:50:21 +00:00
Victor Hernandez 6c730dea6f In WriteFunction(), write function-local metadata before we write the instructions, so instruction's references to metadata are fully resolved by the time they get written.
llvm-svn: 93403
2010-01-14 01:50:08 +00:00
Victor Hernandez 61e6e829c6 Fix printing of function-local metadata in AsmWriter
llvm-svn: 93402
2010-01-14 01:47:37 +00:00
Victor Hernandez b816154268 Clean up unnecessary return and brackets
llvm-svn: 93401
2010-01-14 01:46:02 +00:00
Victor Hernandez 8c85e25589 Add MDNode::getFunction(), which figures out the metadata's function, if it has function that it is local to.
llvm-svn: 93400
2010-01-14 01:45:14 +00:00
Anders Carlsson 2a4adbea96 Add a DenseMapInfo specialization for BaseSubobject.
llvm-svn: 93399
2010-01-14 01:39:42 +00:00
Douglas Gregor 69a8e083c5 When providing completions for a member access expression in C++,
provided nested-name-specifier results for base classes (only), rather
than everything that could possibly be a nested-name-specifier.

llvm-svn: 93398
2010-01-14 01:17:14 +00:00
Douglas Gregor c580c5205f Switch code-completion for ordinary names over to the new(ish)
LookupVisibleDecls, unifying the name lookup mechanisms used by code
completion and typo correction. Aside from the software-engineering
improvements, this makes code-completion see through using directives
and see ivars when performing unqualified name lookup in an
Objective-C instance method.

llvm-svn: 93397
2010-01-14 01:09:38 +00:00
John McCall a1709fd822 Improve the diagnostic for bad conversions in overload resolution to talk
about 'object argument' vs. 'nth argument'.

llvm-svn: 93395
2010-01-14 00:56:20 +00:00
Jakob Stoklund Olesen bff090648b Don't fold insufficiently aligned ldr/str into ldm/stm instructions.
An unaligned ldr causes a trap, and is then emulated by the kernel with
awesome performance. The darwin kernel does not emulate unaligned ldm/stm
Thumb2 instructions, so don't generate them.

This fixes the miscompilation of Multisource/Applications/JM/lencod for Thumb2.

Generating unaligned ldr/str pairs from a 16-bit aligned memcpy is probably
also a bad idea, but that is beyond the scope of this patch.

llvm-svn: 93393
2010-01-14 00:54:10 +00:00
John McCall 9015cde4dc Add the %ordinal format modifier for turning '1' into '1st'. Hard-coded for
English right now;  would not be impossible to grab a special format string
from the diagnostic pool and localize that way.

llvm-svn: 93390
2010-01-14 00:50:32 +00:00
Devang Patel 4274a326be Because CurLoc is the current source location as far as CGDebugInfo is concerned. It is expected that this is set (usually left bracket location of function body compound statement) before EmitfunctionStart() is used.
llvm-svn: 93389
2010-01-14 00:48:09 +00:00
Douglas Gregor e0717ab39c More refactoring of ResultBuilder::MaybeAddResult. No intended
functionality change.

llvm-svn: 93386
2010-01-14 00:41:07 +00:00
Devang Patel 934661ed73 Emit human readable names for c/c++ functions. Avoid emitting linkage name if it matches regular name.
llvm-svn: 93383
2010-01-14 00:36:21 +00:00