Commit Graph

89637 Commits

Author SHA1 Message Date
Dan Gohman cba5cf6b6b Add a comment.
llvm-svn: 111640
2010-08-20 16:35:30 +00:00
Dan Gohman 38adfdd100 Move raw_ostream's Error flag into raw_fd_ostream, as that's the only
class which is using it.

llvm-svn: 111639
2010-08-20 16:34:20 +00:00
Dan Gohman c53191aba4 Export error-handling functions in formatted_tool_output_file.
llvm-svn: 111638
2010-08-20 16:27:38 +00:00
Chris Lattner 9052c35479 fix some vector extractions to return properly zero extended values
(instead of sign extending) to match ICC.  GCC is changing this in 
a series of their own PRs (e.g. 41323).

llvm-svn: 111637
2010-08-20 16:08:33 +00:00
Argyrios Kyrtzidis ba88bfab37 Use the AST on-disk hash table for name lookup inside a DeclContext.
*Huge* improvement over the amount of deserializing that we do for C++ lookup.
e.g, if he have the Carbon header precompiled and include it on a file containing this:

int x;

these are the before/after stats:

BEFORE:

*** AST File Statistics:
  578 stat cache hits
  4 stat cache misses
  548/30654 source location entries read (1.787695%)
  15907/16501 types read (96.400223%)
  53525/59955 declarations read (89.275291%)
  33993/43525 identifiers read (78.099945%)
  41516/51891 statements read (80.006165%)
  77/5317 macros read (1.448185%)
  0/6335 lexical declcontexts read (0.000000%)
  1/5424 visible declcontexts read (0.018437%)

AFTER using the on-disk table:

*** AST File Statistics:
  578 stat cache hits
  4 stat cache misses
  548/30654 source location entries read (1.787695%)
  10/16501 types read (0.060602%)
  9/59955 declarations read (0.015011%)
  161/43525 identifiers read (0.369902%)
  20/51891 statements read (0.038542%)
  6/5317 macros read (0.112846%)
  0/6335 lexical declcontexts read (0.000000%)
  2/5424 visible declcontexts read (0.036873%)

There's only one issue affecting mostly the precompiled preambles which I will address soon.

llvm-svn: 111636
2010-08-20 16:04:35 +00:00
Argyrios Kyrtzidis 07347321c6 Introduce the mechanism for building an AST on-disk hash table for name lookup inside a DeclContext but don't use it yet.
llvm-svn: 111635
2010-08-20 16:04:27 +00:00
Argyrios Kyrtzidis 082e4613eb Refactoring; move the functionality of ASTWriter::GetOrCreateTypeID to the more generic
MakeTypeID template function which accepts a type and a function object that returns a TypeIdx.

MakeTypeID is in PCHCommon.h so that it can be used by ASTReader too.

llvm-svn: 111634
2010-08-20 16:04:20 +00:00
Argyrios Kyrtzidis 9ab44ea6bd Introduce ASTWriter::GetOrCreateTypeID and move most of the functionality of AddTypeRef there.
No functionality change.

llvm-svn: 111633
2010-08-20 16:04:14 +00:00
Argyrios Kyrtzidis e394f2ca8b A bit of refactoring; Introduce ASTWriter::GetOrCreateTypeIdx and move the emission of types there.
No functionality change.

llvm-svn: 111632
2010-08-20 16:04:09 +00:00
Argyrios Kyrtzidis a7fbbb0546 Rename TypeIDs -> TypeIdxs. No functionality change.
llvm-svn: 111631
2010-08-20 16:04:04 +00:00
Argyrios Kyrtzidis bb5c7eae4c serialization::TypeID is used with or without qualifiers, both as index and as index + qualifiers.
Disambiguate and provide some type safety by using a new class TypeIdx for the "TypeID as index" semantics.

llvm-svn: 111630
2010-08-20 16:03:59 +00:00
Argyrios Kyrtzidis 4bd97102e9 Share the common code of ComputeHash(Selector Sel) instead of keeping 2 copies in PCHReader and PCHWriter.
No functionality change.

llvm-svn: 111629
2010-08-20 16:03:52 +00:00
Bob Wilson da7be91e1c Fix a typo.
llvm-svn: 111627
2010-08-20 14:54:37 +00:00
Erick Tryzelaar 8264a68b4c Fix the running of ocaml tests.
llvm-svn: 111626
2010-08-20 14:51:26 +00:00
Erick Tryzelaar b4d48706ca Expose LLVMSetOperand and LLVMGetNumOperands to llvm-c and ocaml.
llvm-svn: 111625
2010-08-20 14:51:22 +00:00
Erick Tryzelaar 34ce63a464 Fix arguments to ocaml's llvm_params.
Thanks to Jianzhou Zhao for finding this.

llvm-svn: 111624
2010-08-20 14:51:16 +00:00
Bob Wilson 21b62ac673 Fix some Ocaml tests: the %t substitution now returns an absolute path.
llvm-svn: 111623
2010-08-20 14:20:17 +00:00
Bob Wilson 6c66144eb3 The %ocamlopt setting has embedded quotes. Copy the entire value instead
of stopping at the first embedded quote.

llvm-svn: 111622
2010-08-20 14:19:38 +00:00
Benjamin Kramer 18f47c7105 Update LLVMC tests for r111620.
llvm-svn: 111621
2010-08-20 13:03:33 +00:00
Mikhail Glushenkov 3eab653285 llvmc: Do not prefix option names with AutoGenerated.
Since they now live in the namespace 'autogenerated'.

llvm-svn: 111620
2010-08-20 11:24:51 +00:00
Mikhail Glushenkov 024ec17332 llvmc: Cut global namespace pollution.
llvm-svn: 111619
2010-08-20 11:24:44 +00:00
Mikhail Glushenkov e140dbc0cc Disambiguate calls to WriteGraph() to disable ADL.
llvm-svn: 111618
2010-08-20 11:24:35 +00:00
Mikhail Glushenkov b6476afeb8 Trailing whitespace.
llvm-svn: 111617
2010-08-20 11:24:31 +00:00
Ted Kremenek 87562e8371 Remove dead code.
llvm-svn: 111616
2010-08-20 06:06:41 +00:00
Ted Kremenek b14df8cb60 Update help text for -cc1 -unoptimized-cfg.
llvm-svn: 111615
2010-08-20 05:53:47 +00:00
Bob Wilson 9a511c07e4 Replace the arm.neon.vmovls and vmovlu intrinsics with vector sign-extend and
zero-extend operations.

llvm-svn: 111614
2010-08-20 04:54:02 +00:00
Bob Wilson b02244969d Translate NEON vmovl intrinsics to zero/sign-extend operations.
llvm-svn: 111612
2010-08-20 03:36:08 +00:00
Douglas Gregor 5be1eb8daf Revert r111609, which is failing its new test.
llvm-svn: 111611
2010-08-20 03:26:10 +00:00
Douglas Gregor 12e2a06824 Eliminate some extraneous whitespace in the machine-parseable Fix-It output.
llvm-svn: 111610
2010-08-20 03:17:33 +00:00
John McCall a189f2eb0a Detect efforts to declare a template member friend and explicitly ignore them.
Avoids a crash.

llvm-svn: 111609
2010-08-20 01:40:01 +00:00
Jim Ingham 5466e751f0 Added "source list -n" so you can list by symbol name. Moved "--count" from "-n" to "-c". Added a -s option so you can restrict the source listing to a particular shared library.
llvm-svn: 111608
2010-08-20 01:17:07 +00:00
Jim Ingham 64b931c1e1 Add an accessor to get the Declaration for a type.
llvm-svn: 111607
2010-08-20 01:15:38 +00:00
Jim Ingham 9976033698 Add methods to Function to get the first and last source lines of the function, and to get whether this Function is an inlined instance or not.
llvm-svn: 111606
2010-08-20 01:15:01 +00:00
Jim Ingham 182702076b Remove redundant call to ParseCompileUnitLineTable. The call to sc.comp_unit->GetLineTable() will parse the line table if it hasn't been read in.
llvm-svn: 111605
2010-08-20 01:13:58 +00:00
Dan Gohman 4cc73ba337 Use tool_output_file in llvm-extract and llvm-link too.
llvm-svn: 111604
2010-08-20 01:12:13 +00:00
Dan Gohman 268b0f4781 Use the new tool_output_file in several tools. This fixes a variety
of problems with output files being left behind or output streams
being left unclosed. Fix llvm-mc to respect the -o option in all
modes, rather than hardcoding outs() in some cases.

llvm-svn: 111603
2010-08-20 01:07:01 +00:00
Jordy Rose 796b5122d9 Handle nested compound values in BindArray for multidimensional arrays. Fixes PR7945.
llvm-svn: 111602
2010-08-20 01:05:59 +00:00
Dan Gohman d3ee4238a5 Make the SCC printing passes use errs() instead of outs(), as the
other printing passes do, and update the documentation accordingly.

llvm-svn: 111601
2010-08-20 01:03:44 +00:00
Sean Callanan d0ef0eff61 First step of refactoring variable handling in the
expression parser.  There shouldn't be four separate
classes encapsulating a variable.

ClangExpressionVariable is now meant to be the
container for all variable information.  It has
several optional components that hold data for
different subsystems.

ClangPersistentVariable has been removed; we now
use ClangExpressionVariable instead.

llvm-svn: 111600
2010-08-20 01:02:30 +00:00
Dan Gohman 05336d9596 Print chatty verbose messages to errs() instead of outs().
llvm-svn: 111599
2010-08-20 01:02:14 +00:00
Dan Gohman 061cb1cac7 Minor cleanups to follow the common convention for pass
registration variables.

llvm-svn: 111598
2010-08-20 01:00:03 +00:00
Douglas Gregor b97b666c47 When performing code-completion in the presence of a preamble, make
sure to (1) actually use the remapped files we were given rather
than old data, and (2) keep the remapped files alive until the
code-completion results are destroyed. Big thanks to Daniel for the
test case.

llvm-svn: 111597
2010-08-20 00:59:43 +00:00
Dan Gohman 12bb5054b3 Minor cleanups to follow the common convention for pass
registration variables.

llvm-svn: 111596
2010-08-20 00:56:16 +00:00
Dan Gohman b87ad69350 Introduce a new tool_output_file class, which extends raw_ostream with
functionality that most command-line tools need: ensuring that the
output file gets deleted if the tool is interrupted or encounters an
error.

llvm-svn: 111595
2010-08-20 00:48:10 +00:00
Eric Christopher 985d9e4ea8 Fix loop conditionals (MO.isDef() asserts that it's a reg) and
move some constraints around.

llvm-svn: 111594
2010-08-20 00:36:24 +00:00
Johnny Chen f85b0b866c Converted to use runCmd() and expect() for more abstraction.
llvm-svn: 111593
2010-08-20 00:27:37 +00:00
Eric Christopher d8e8a2945e Add a couple of random comments.
llvm-svn: 111592
2010-08-20 00:20:31 +00:00
John McCall f834bcd659 Mangle explicit template arguments in dependent or overloaded names.
llvm-svn: 111591
2010-08-20 00:17:19 +00:00
Douglas Gregor 7b02b583b2 When we decide not to reuse a precompiled preamble, clear out the
previous precompiled preamble completely. Fixes <rdar://problem/8330950>.

llvm-svn: 111590
2010-08-20 00:02:33 +00:00
Johnny Chen a6480c124e Use cmd.startswith("run") instead of string equivalence test.
llvm-svn: 111587
2010-08-19 23:53:55 +00:00