llvm-project/clang/lib/CodeGen
Alexis Hunt dcfba7b35b Generate Attr subclasses with TableGen.
Now all classes derived from Attr are generated from TableGen.
Additionally, Attr* is no longer its own linked list; SmallVectors or
Attr* are used. The accompanying LLVM commit contains the updates to
TableGen necessary for this.

Some other notes about newly-generated attribute classes:

 - The constructor arguments are a SourceLocation and a Context&,
   followed by the attributes arguments in the order that they were
   defined in Attr.td

 - Every argument in Attr.td has an appropriate accessor named getFoo,
   and there are sometimes a few extra ones (such as to get the length
   of a variadic argument).

Additionally, specific_attr_iterator has been introduced, which will
iterate over an AttrVec, but only over attributes of a certain type. It
can be accessed through either Decl::specific_attr_begin/end or
the global functions of the same name.

llvm-svn: 111455
2010-08-18 23:23:40 +00:00
..
ABIInfo.h fix PR5179 and correctly fix PR5831 to not miscompile. 2010-07-30 04:02:24 +00:00
BackendUtil.cpp Driver/IRgen: Add support for -momit-leaf-frame-pointer. 2010-07-01 01:31:45 +00:00
CGBlocks.cpp Make use of __func__ in a block actually refer to 2010-08-13 00:19:55 +00:00
CGBlocks.h IRgen: Move blocks runtime interfaces to CodeGenModule. 2010-07-16 00:00:15 +00:00
CGBuilder.h Make CGBuilderTy a typedef again; its functionality has been rolled back 2010-07-06 18:43:48 +00:00
CGBuiltin.cpp vdup_lane was missing 2010-08-06 01:24:57 +00:00
CGCXX.cpp Implement support for member pointers under the Microsoft C++ ABI in the 2010-08-16 03:33:14 +00:00
CGCXX.h Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
CGCXXABI.h Implement support for member pointers under the Microsoft C++ ABI in the 2010-08-16 03:33:14 +00:00
CGCall.cpp fix PR5179 and correctly fix PR5831 to not miscompile. 2010-07-30 04:02:24 +00:00
CGCall.h relax the CGFunctionInfo::CGFunctionInfo ctor to allow any sequence 2010-06-29 18:13:52 +00:00
CGClass.cpp Emit a stop point for delegate constructor call. This gives user a chance to step into constructor body. 2010-08-11 21:04:37 +00:00
CGDebugInfo.cpp Emit debug info for static const class member. 2010-08-12 00:02:44 +00:00
CGDebugInfo.h Simplify code and add comments, in code that generate debug info for constant integer globals, based on Chris's feedback. 2010-08-10 17:53:33 +00:00
CGDecl.cpp Further adjustments to -Wglobal-constructors; works for references and direct 2010-08-02 21:13:48 +00:00
CGDeclCXX.cpp When initializing a static local, pop the guard-abort EH cleanup after 2010-08-10 18:51:44 +00:00
CGException.cpp Sketch out a framework for delaying the activation of a cleanup. 2010-08-13 21:20:51 +00:00
CGException.h More cleanup enabling. 2010-08-14 07:46:19 +00:00
CGExpr.cpp fix typo 2010-08-18 00:13:52 +00:00
CGExprAgg.cpp Store inheritance paths after CastExprs instead of inside them. 2010-08-07 06:22:56 +00:00
CGExprCXX.cpp Implement zero-initialization for array new when there is an 2010-07-21 01:10:17 +00:00
CGExprComplex.cpp Add lvalue-bitcast support for complex numbers. 2010-07-14 21:35:45 +00:00
CGExprConstant.cpp Store inheritance paths after CastExprs instead of inside them. 2010-08-07 06:22:56 +00:00
CGExprScalar.cpp Zap unused UnaryOperator::OffsetOf. 2010-08-13 01:36:11 +00:00
CGObjC.cpp Store inheritance paths after CastExprs instead of inside them. 2010-08-07 06:22:56 +00:00
CGObjCGNU.cpp Convert all uses of StringLiteral::getStrData() to StringLiteral::getString() 2010-08-17 12:54:38 +00:00
CGObjCMac.cpp zap dead code. 2010-08-18 16:09:06 +00:00
CGObjCRuntime.h Some early work for providing block layout info. 2010-08-04 16:57:49 +00:00
CGRTTI.cpp Explicitly handle every case in the switch in RTTIBuilder::BuildTypeInfo. 2010-08-15 00:24:31 +00:00
CGRecordLayout.h Keep track of the LLVM field numbers for non-virtual bases. 2010-05-18 05:22:06 +00:00
CGRecordLayoutBuilder.cpp AST: Rename PragmaPackAttr to MaxFieldAlignmentAttr, which is more accurate. 2010-05-27 01:12:46 +00:00
CGStmt.cpp Slightly revised handling of mult-alt constraints, to avoid an assert, until we have the full fix. 2010-08-10 19:20:14 +00:00
CGTemporaries.cpp Rename LazyCleanup -> Cleanup. No functionality change for these last three 2010-07-21 07:22:38 +00:00
CGVTT.cpp The global variable for the VTT might not have external linkage; allow 2010-05-06 22:18:21 +00:00
CGVTables.cpp Just disable the hidden-visibility optimization for now by hiding it behind 2010-08-12 23:36:15 +00:00
CGVTables.h Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH. 2010-07-07 11:31:19 +00:00
CGValue.h Adopt objc_assign_threadlocal() for __thread variables of GC types. 2010-07-20 20:30:03 +00:00
CMakeLists.txt Update CMake build for new attribute changes. 2010-06-17 00:37:02 +00:00
CodeGenAction.cpp Break Frontend's dependency on Rewrite, Checker and CodeGen in shared library configuration 2010-06-15 17:48:49 +00:00
CodeGenFunction.cpp More cleanup enabling. 2010-08-14 07:46:19 +00:00
CodeGenFunction.h More cleanup enabling. 2010-08-14 07:46:19 +00:00
CodeGenModule.cpp Generate Attr subclasses with TableGen. 2010-08-18 23:23:40 +00:00
CodeGenModule.h Implement support for member pointers under the Microsoft C++ ABI in the 2010-08-16 03:33:14 +00:00
CodeGenTypes.cpp fix rdar://8147692 - yet another crash due to my abi work. 2010-07-01 06:20:47 +00:00
CodeGenTypes.h Kill off the 'coerce' ABI passing form. Now 'direct' and 'extend' always 2010-07-29 06:26:06 +00:00
GlobalDecl.h Add GlobalDecl::getCanonicalDecl. 2010-06-22 16:00:14 +00:00
ItaniumCXXABI.cpp Implement support for member pointers under the Microsoft C++ ABI in the 2010-08-16 03:33:14 +00:00
Makefile BUILD_ARCHIVE is the default for libraries, no need to set it. 2010-07-18 00:14:47 +00:00
Mangle.cpp Contextual arity is a feature of mangling expressions; kill off 2010-08-18 19:18:59 +00:00
Mangle.h Add function for mangling reference temporaries. 2010-06-26 16:09:40 +00:00
MicrosoftCXXABI.cpp zap dead code. 2010-08-18 16:09:06 +00:00
ModuleBuilder.cpp Move CodeGenOptions.h *back* into Frontend. This should have been done when the 2010-06-15 23:19:56 +00:00
README.txt These IRgen improvements have been done. 2009-07-23 03:03:07 +00:00
TargetInfo.cpp fix PR5179 and correctly fix PR5831 to not miscompile. 2010-07-30 04:02:24 +00:00
TargetInfo.h Fix the IR generation for catching pointers by references. 2010-07-20 22:17:55 +00:00

README.txt

IRgen optimization opportunities.

//===---------------------------------------------------------------------===//

The common pattern of
--
short x; // or char, etc
(x == 10)
--
generates an zext/sext of x which can easily be avoided.

//===---------------------------------------------------------------------===//

Bitfields accesses can be shifted to simplify masking and sign
extension. For example, if the bitfield width is 8 and it is
appropriately aligned then is is a lot shorter to just load the char
directly.

//===---------------------------------------------------------------------===//

It may be worth avoiding creation of alloca's for formal arguments
for the common situation where the argument is never written to or has
its address taken. The idea would be to begin generating code by using
the argument directly and if its address is taken or it is stored to
then generate the alloca and patch up the existing code.

In theory, the same optimization could be a win for block local
variables as long as the declaration dominates all statements in the
block.

NOTE: The main case we care about this for is for -O0 -g compile time
performance, and in that scenario we will need to emit the alloca
anyway currently to emit proper debug info. So this is blocked by
being able to emit debug information which refers to an LLVM
temporary, not an alloca.

//===---------------------------------------------------------------------===//

We should try and avoid generating basic blocks which only contain
jumps. At -O0, this penalizes us all the way from IRgen (malloc &
instruction overhead), all the way down through code generation and
assembly time.

On 176.gcc:expr.ll, it looks like over 12% of basic blocks are just
direct branches!

//===---------------------------------------------------------------------===//