freebsd-nq/lib/CodeGen
2016-12-02 19:20:19 +00:00
..
ABIInfo.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
Address.h Vendor import of clang release_38 branch r260756: 2016-02-13 14:58:13 +00:00
BackendUtil.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGAtomic.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGBlocks.cpp Vendor import of clang release_39 branch r278877: 2016-08-17 19:34:38 +00:00
CGBlocks.h Vendor import of clang trunk r256633: 2015-12-30 11:49:41 +00:00
CGBuilder.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGBuiltin.cpp Vendor import of clang release_39 branch r278877: 2016-08-17 19:34:38 +00:00
CGCall.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGCall.h Vendor import of clang trunk r256633: 2015-12-30 11:49:41 +00:00
CGClass.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGCleanup.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGCleanup.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGCUDABuiltin.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGCUDANV.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGCUDARuntime.cpp Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1): 2015-01-18 16:23:48 +00:00
CGCUDARuntime.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGCXX.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGCXXABI.cpp Vendor import of clang trunk r256633: 2015-12-30 11:49:41 +00:00
CGCXXABI.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGDebugInfo.cpp Vendor import of clang release_39 branch r278877: 2016-08-17 19:34:38 +00:00
CGDebugInfo.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGDecl.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGDeclCXX.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGException.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGExpr.cpp Vendor import of clang release_39 branch r287912: 2016-11-25 19:07:40 +00:00
CGExprAgg.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGExprComplex.cpp Vendor import of clang trunk r257626: 2016-01-13 20:00:46 +00:00
CGExprConstant.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGExprCXX.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGExprScalar.cpp Vendor import of clang release_39 branch r279477: 2016-08-24 17:36:20 +00:00
CGLoopInfo.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGLoopInfo.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGObjC.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGObjCGNU.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGObjCMac.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGObjCRuntime.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGObjCRuntime.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGOpenCLRuntime.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGOpenCLRuntime.h Vendor import of clang trunk r257626: 2016-01-13 20:00:46 +00:00
CGOpenMPRuntime.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGOpenMPRuntime.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGOpenMPRuntimeNVPTX.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGOpenMPRuntimeNVPTX.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGRecordLayout.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGRecordLayoutBuilder.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGStmt.cpp Vendor import of clang release_39 branch r287912: 2016-11-25 19:07:40 +00:00
CGStmtOpenMP.cpp Vendor import of clang release_39 branch r288513: 2016-12-02 19:20:19 +00:00
CGValue.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGVTables.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CGVTables.h Vendor import of clang trunk r256633: 2015-12-30 11:49:41 +00:00
CGVTT.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CMakeLists.txt Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CodeGenABITypes.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CodeGenAction.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CodeGenFunction.cpp Vendor import of clang release_39 branch r287912: 2016-11-25 19:07:40 +00:00
CodeGenFunction.h Vendor import of clang release_39 branch r288513: 2016-12-02 19:20:19 +00:00
CodeGenModule.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CodeGenModule.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CodeGenPGO.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CodeGenPGO.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CodeGenTBAA.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CodeGenTBAA.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CodeGenTypeCache.h Vendor import of clang trunk r256633: 2015-12-30 11:49:41 +00:00
CodeGenTypes.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CodeGenTypes.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
CoverageMappingGen.cpp Vendor import of clang release_39 branch r278877: 2016-08-17 19:34:38 +00:00
CoverageMappingGen.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
EHScopeStack.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
ItaniumCXXABI.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
MicrosoftCXXABI.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
ModuleBuilder.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
ObjectFilePCHContainerOperations.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
README.txt Update clang to r84119. 2009-10-14 18:03:49 +00:00
SanitizerMetadata.cpp Vendor import of clang trunk r240225: 2015-06-21 14:00:56 +00:00
SanitizerMetadata.h Vendor import of clang trunk r238337: 2015-05-27 18:47:56 +00:00
SwiftCallingConv.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
TargetInfo.cpp Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00
TargetInfo.h Vendor import of clang release_39 branch r276489: 2016-07-23 20:44:14 +00:00

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!

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