[llvm-commits] [llvm] r40927 - /llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp
Reid Spencer
rspencer at reidspencer.com
Wed Aug 8 09:59:01 PDT 2007
On Wed, 2007-08-08 at 16:19 +0000, Chris Lattner wrote:
> Author: lattner
> Date: Wed Aug 8 11:19:57 2007
> New Revision: 40927
>
> URL: http://llvm.org/viewvc/llvm-project?rev=40927&view=rev
> Log:
> eliminate redundant conditions from the signless types conversion.
And I thought I'd gotten all of those. Thanks!
Reid.
>
> Modified:
> llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp
>
> Modified: llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp?rev=40927&r1=40926&r2=40927&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp (original)
> +++ llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp Wed Aug 8 11:19:57 2007
> @@ -107,11 +107,10 @@
>
> // Handle some common cases first. These cases correspond to common `main'
> // prototypes.
> - if (RetTy == Type::Int32Ty || RetTy == Type::Int32Ty || RetTy == Type::VoidTy) {
> + if (RetTy == Type::Int32Ty || RetTy == Type::VoidTy) {
> switch (ArgValues.size()) {
> case 3:
> - if ((FTy->getParamType(0) == Type::Int32Ty ||
> - FTy->getParamType(0) == Type::Int32Ty) &&
> + if (FTy->getParamType(0) == Type::Int32Ty &&
> isa<PointerType>(FTy->getParamType(1)) &&
> isa<PointerType>(FTy->getParamType(2))) {
> int (*PF)(int, char **, const char **) =
> @@ -126,8 +125,7 @@
> }
> break;
> case 2:
> - if ((FTy->getParamType(0) == Type::Int32Ty ||
> - FTy->getParamType(0) == Type::Int32Ty) &&
> + if (FTy->getParamType(0) == Type::Int32Ty &&
> isa<PointerType>(FTy->getParamType(1))) {
> int (*PF)(int, char **) = (int(*)(int, char **))(intptr_t)FPtr;
>
> @@ -140,8 +138,7 @@
> break;
> case 1:
> if (FTy->getNumParams() == 1 &&
> - (FTy->getParamType(0) == Type::Int32Ty ||
> - FTy->getParamType(0) == Type::Int32Ty)) {
> + FTy->getParamType(0) == Type::Int32Ty) {
> GenericValue rv;
> int (*PF)(int) = (int(*)(int))(intptr_t)FPtr;
> rv.IntVal = APInt(32, PF(ArgValues[0].IntVal.getZExtValue()));
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list