summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Use cached types; no functionality change.John McCall2011-07-101-35/+18
| | | | llvm-svn: 134880
* Fix ARCMT/migrate.m on MSVC. Francois Pichet2011-07-101-0/+5
| | | | | | Solution is to set output stdout to binary mode to prevent newline conversion (\n => \r\n). llvm-svn: 134879
* Unbreak -cc1as mode after MC subtarget changesJoerg Sonnenberger2011-07-101-0/+1
| | | | llvm-svn: 134877
* [arcmt] Remove redundant has_error() check.Argyrios Kyrtzidis2011-07-101-2/+2
| | | | llvm-svn: 134876
* [arcmt] Try fixing test/ARCMT/migrate.m for windows hosts.Argyrios Kyrtzidis2011-07-101-1/+2
| | | | llvm-svn: 134875
* test/CMakeLists.txt: clang-test may depend on llc when LLVM is built together.NAKAMURA Takumi2011-07-101-2/+1
| | | | llvm-svn: 134874
* test/CMakeLists.txt: Fix ClangUnitTests to be built with clang-test and ↵NAKAMURA Takumi2011-07-101-2/+2
| | | | | | check-all. llvm-svn: 134873
* tools/c-arcmt-test/Makefile: Add clangARCMigrate.a clangRewrite.a to ↵NAKAMURA Takumi2011-07-101-1/+2
| | | | | | | USEDLIBS to satisfy linking on cygming. FIXME: tools/c-*.exe should be linked to clang.dll on cygming. llvm/Makefile.rules is not aware of bin/clang.dll. llvm-svn: 134871
* relax this test a bit to hopefully work with VC++Chris Lattner2011-07-101-1/+1
| | | | llvm-svn: 134870
* Change __debugbreak signature to void __debugbreak(void); MSVC compatibility.Francois Pichet2011-07-102-2/+2
| | | | llvm-svn: 134869
* implement a nice new optimization: CodeGenTypes::UpdateCompletedTypeChris Lattner2011-07-102-5/+5
| | | | | | | | | | | | | is called whenever a tag type is completed. We previously used that as the sign to layout the codegen representation for the tag type, which worked but meant that we laid out *every* completed type, whether it was used or not. Now we just lay out the type if we've already seen it somehow else. This means that we lay out types we've used but haven't seen a body for, but we don't lay out tons of stuff that noone cares about. llvm-svn: 134866
* enhance EmitLValueForFieldInitialization to do the proper pointer ↵Chris Lattner2011-07-101-9/+9
| | | | | | | | adjustment, allowing us to revert the other half of r134860. Now things are back to a relatively tidy state. llvm-svn: 134865
* revert part of r134860, which is empirically unnecessary after the proper fixChris Lattner2011-07-101-4/+0
| | | | llvm-svn: 134864
* keep track of whether being in a RS_StructPointer stateChris Lattner2011-07-105-9/+20
| | | | | | | | | | caused us to skip layout out a function accurately. If so, flush the type cache for both the function and struct case to ensure that any pointers to the functions get recomputed. This is overconservative, but with this patch clang can build itself again. llvm-svn: 134863
* change EmitLValueForField to cast the returned lvalue to the rightChris Lattner2011-07-101-13/+18
| | | | | | | type, even when in the struct case. This was one root issue that was causing type mismatches throughout the compiler. llvm-svn: 134862
* Fix the clang bootstrap and Jay's testcase from llvm-dev by being completelyChris Lattner2011-07-106-15/+55
| | | | | | | | | | conservative when converting a functiontype to IR when in a "pointer within a struct" context. This has the unfortunate sideeffect of compiling all function pointers inside of structs into "{}*" which, though correct, is ugly. This has the positive side effect of being correct, and it is pretty straight-forward to improve on this. llvm-svn: 134861
* when emitting pointer load from an lvalue or storing to an lvalue,Chris Lattner2011-07-101-0/+12
| | | | | | | do an explicit bitcast to whatever ConvertType produces. This will go with the next patch. llvm-svn: 134860
* c-arcmt-test.c: MSVCRT does not have setenv. Use putenv instead.NAKAMURA Takumi2011-07-101-0/+5
| | | | llvm-svn: 134859
* how about we initialize RecursionState.Chris Lattner2011-07-102-2/+2
| | | | llvm-svn: 134855
* Rename CGT::VerifyFuncTypeComplete to isFuncTypeConvertible sinceChris Lattner2011-07-106-28/+73
| | | | | | | | | | | | | | | | | | it is a predicate, not an action. Change the return type to be a bool, not the incomplete member. Enhace it to detect the recursive compilation case, allowing us to compile Eli's testcase on llvmdev: struct T { struct T (*p)(void); } t; into: %struct.T = type { {}* } @t = common global %struct.T zeroinitializer, align 8 llvm-svn: 134853
* test/CMakeLists.txt: Add missing c-arcmt-test to clang-test.deps.NAKAMURA Takumi2011-07-091-1/+1
| | | | llvm-svn: 134851
* Fix linker problem in buildbot.Argyrios Kyrtzidis2011-07-092-2/+2
| | | | llvm-svn: 134849
* Ugh, fix CMake.Argyrios Kyrtzidis2011-07-091-1/+1
| | | | llvm-svn: 134848
* [libclang] Fix linker error in buildbots.Argyrios Kyrtzidis2011-07-092-1/+3
| | | | llvm-svn: 134847
* [arcmt] Remove test/ARCMT/with-working-dir.m which fails at windows hosts ↵Argyrios Kyrtzidis2011-07-092-90/+0
| | | | | | | | and is not that useful in the first place. http://llvm.org/PR10312. llvm-svn: 134845
* [arcmt] Introduce new '-ccc-arcmt-migrate <path>' ARC migration driver option.Argyrios Kyrtzidis2011-07-0931-31/+646
| | | | | | | | | | | | | | | | | | | | This is a new mode of migration, where we avoid modifying the original files but we emit temporary files instead. <path> will be used to keep migration process metadata. Currently the temporary files that are produced are put in the system's temp directory but we can put them in the <path> if is necessary. Also introduce new ARC migration functions in libclang whose only purpose, currently, is to accept <path> and provide pairs of original file/transformed file to map from the originals to the files after transformations are applied. Finally introduce the c-arcmt-test utility that exercises the new libclang functions, update arcmt-test, and add tests for the whole process. rdar://9735086. llvm-svn: 134844
* when an enum type is completed, only flush the type cache whenChris Lattner2011-07-091-2/+4
| | | | | | | the enum has already been converted. If not, there cannot be any types built on top of it, so there is no need to flush the cache. llvm-svn: 134841
* fix this on 32-bit hosts.Chris Lattner2011-07-091-1/+1
| | | | llvm-svn: 134840
* clang side to match the LLVM IR type system rewrite patch.Chris Lattner2011-07-0983-1050/+935
| | | | llvm-svn: 134831
* More compiler workarounds. I have to admit that I was notJohn McCall2011-07-091-4/+14
| | | | | | | | expecting so much concentrated oddity on what seemed like a trivial feature. Thanks to François Pichet for doing the MSVC legwork here. llvm-svn: 134813
* cc1 must initialize MC subtarget infos for inline asm parsing. Re-enable ↵Evan Cheng2011-07-092-4/+3
| | | | | | asm-errors.c llvm-svn: 134811
* disable this test to get the botz green again.Chris Lattner2011-07-091-2/+4
| | | | llvm-svn: 134808
* createAsmParser API change.Evan Cheng2011-07-091-3/+6
| | | | llvm-svn: 134797
* GCC 4.2 compatibility hack.John McCall2011-07-091-3/+4
| | | | llvm-svn: 134785
* A number of array-related IR-gen cleanups.John McCall2011-07-0910-288/+618
| | | | | | | | | | | | - Emit default-initialization of arrays that were partially initialized with initializer lists with a loop, rather than emitting the default initializer N times; - support destroying VLAs of non-trivial type, although this is not yet exposed to users; and - support the partial destruction of arrays initialized with initializer lists when an initializer throws an exception. llvm-svn: 134784
* Silly typo in test for r134770.Eli Friedman2011-07-081-1/+1
| | | | llvm-svn: 134774
* Change -mno-mmx to be more compatible with gcc. Specifically, -mno-mmx ↵Eli Friedman2011-07-086-50/+84
| | | | | | | | | | | | should not imply -mno-sse. Note that because we don't usually touch the MMX registers anyway, all -mno-mmx needs to do is tweak the x86-32 calling convention a little for vectors that look like MMX vectors, and prevent the definition of __MMX__. clang doesn't actually stop the user from using MMX inline asm operands or MMX builtins in -mno-mmx mode; as a QOI issue, it would be nice to diagnose, but I doubt it really matters much. <rdar://problem/9694837> llvm-svn: 134770
* Revert x86_64 ABI changes until I have time to check the items raised by Eli.Bruno Cardoso Lopes2011-07-082-89/+42
| | | | llvm-svn: 134765
* Introduce __builtin_expect() intrinsic support.Jakub Staszak2011-07-082-4/+36
| | | | llvm-svn: 134761
* Add support for AVX 256-bit in the x86_64 ABI (as in the 0.99.5 draft)Bruno Cardoso Lopes2011-07-082-42/+89
| | | | llvm-svn: 134754
* Add codegen support for the fma/fmal/fmaf builtins.Cameron Zwarich2011-07-083-0/+43
| | | | llvm-svn: 134743
* Initialize all the AnalysisBasedWarnings statistics to zero.Benjamin Kramer2011-07-081-1/+7
| | | | | | Found by valgrind. llvm-svn: 134733
* Remove unused variable.Benjamin Kramer2011-07-081-2/+1
| | | | llvm-svn: 134731
* Fix up dependency file name printing to more closely match that of gcc, ↵Eli Friedman2011-07-083-22/+34
| | | | | | | | including fixing a nasty recent regression that could make us print "/foo.h" with a command-line including "-I ./". rdar://problem/9734352 llvm-svn: 134728
* objc++-arc: more diagnosis of converting a weak-unavailableFariborz Jahanian2011-07-086-19/+47
| | | | | | object to a __weak object type. // rdar://9732636 llvm-svn: 134706
* Teach CXXUnresolvedConstructExpr when it should be anDouglas Gregor2011-07-083-2/+27
| | | | | | | lvalue/xvalue/rvalue, rather than just (incorrectly) assuming it's an lvalue. Fixes PR10285 / <rdar://problem/9743926>. llvm-svn: 134700
* Add several CFG-stress-testing input source files. These use theChandler Carruth2011-07-085-0/+124
| | | | | | | preprocessor to build up very large CFGs in various shapes that can produce different algorithmic behavior in CFG-walking code. llvm-svn: 134698
* Make the worklist in the uninitialized values checker actually a queue.Chandler Carruth2011-07-081-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, despite the names 'enqueue' and 'dequeue', it behaved as a stack and visited blocks in a LIFO fashion. This interacts badly with extremely broad CFGs *inside* of a loop (such as a large switch inside a state machine) where every block updates a different variable. When encountering such a CFG, the checker visited blocks in essentially a "depth first" order due to the stack-like behavior of the work list. Combined with each block updating a different variable, the saturation logic of the checker caused it to re-traverse blocks [1,N-1] of the broad CFG inside the loop after traversing block N. These re-traversals were to propagate the variable values derived from block N. Assuming approximately the same number of variables as inner blocks exist, the end result is O(N^2) updates. By making this a queue, we also make the traversal essentially "breadth-first" across each of the N inner blocks of the loop. Then all of this state is propagated around to all N inner blocks of the loop. The result is O(N) updates. The truth is in the numbers: Before, gcc.c: 96409 block visits (max: 61546, avg: 591) After, gcc.c: 69958 block visits (max: 33090, avg: 429) Before, PR10183: 2540494 block vists (max: 2536495, avg: 37360) After, PR10183: 137803 block visits (max: 134406, avg: 2026) The nearly 20x reduction in work for PR10183 corresponds to a roughly 100x speedup in compile time. I've tested it on all the code I can get my hands on, and I've seen no slowdowns due to this change. Where I've collected stats, the ammount of work done is on average less. I'll also commit shortly some synthetic test cases useful in analyzing the performance of CFG-based warnings. Submitting this based on Doug's feedback that post-commit review should be good. Ted, please review! Hopefully this helps compile times until then. llvm-svn: 134697
* Fix a FIXME in clang ARM driver that was exposed as a bug with ARM backendEvan Cheng2011-07-081-11/+2
| | | | | | | | | | | | | change. Previously clang was passing the following feature strings to the ARM backend when CPU is cortex-a8: +neon,-vfp2,-vfp3 This used to work because -vfp2,-vfp3 had no effect after +neon. Now that the features are controlled by individual bits (with implied hierarchy), the net effect is all three features will be turned off. llvm-svn: 134691
* Random cleanup:Francois Pichet2011-07-081-8/+7
| | | | | | | - fix a comment. - Remove an unnecessary { } block. llvm-svn: 134690
OpenPOWER on IntegriCloud