Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Side by Side Diff: lib/CodeGen/IntrinsicLowering.cpp

Issue 183273009: Prep for merging 3.4: Undo changes from 3.3 branch (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Retry Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/CodeGen/AsmPrinter/DwarfDebug.cpp ('k') | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===-- IntrinsicLowering.cpp - Intrinsic Lowering default implementation -===// 1 //===-- IntrinsicLowering.cpp - Intrinsic Lowering default implementation -===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file implements the IntrinsicLowering class. 10 // This file implements the IntrinsicLowering class.
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 } 446 }
447 447
448 case Intrinsic::dbg_declare: 448 case Intrinsic::dbg_declare:
449 break; // Simply strip out debugging intrinsics 449 break; // Simply strip out debugging intrinsics
450 450
451 case Intrinsic::eh_typeid_for: 451 case Intrinsic::eh_typeid_for:
452 // Return something different to eh_selector. 452 // Return something different to eh_selector.
453 CI->replaceAllUsesWith(ConstantInt::get(CI->getType(), 1)); 453 CI->replaceAllUsesWith(ConstantInt::get(CI->getType(), 1));
454 break; 454 break;
455 455
456 case Intrinsic::annotation:
457 case Intrinsic::ptr_annotation:
458 // Just drop the annotation, but forward the value
459 CI->replaceAllUsesWith(CI->getOperand(0));
460 break;
461
462 case Intrinsic::var_annotation: 456 case Intrinsic::var_annotation:
463 break; // Strip out annotate intrinsic 457 break; // Strip out annotate intrinsic
464 458
465 case Intrinsic::memcpy: { 459 case Intrinsic::memcpy: {
466 Type *IntPtr = TD.getIntPtrType(Context); 460 Type *IntPtr = TD.getIntPtrType(Context);
467 Value *Size = Builder.CreateIntCast(CI->getArgOperand(2), IntPtr, 461 Value *Size = Builder.CreateIntCast(CI->getArgOperand(2), IntPtr,
468 /* isSigned */ false); 462 /* isSigned */ false);
469 Value *Ops[3]; 463 Value *Ops[3];
470 Ops[0] = CI->getArgOperand(0); 464 Ops[0] = CI->getArgOperand(0);
471 Ops[1] = CI->getArgOperand(1); 465 Ops[1] = CI->getArgOperand(1);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 Module *M = CI->getParent()->getParent()->getParent(); 556 Module *M = CI->getParent()->getParent()->getParent();
563 Constant *Int = Intrinsic::getDeclaration(M, Intrinsic::bswap, Ty); 557 Constant *Int = Intrinsic::getDeclaration(M, Intrinsic::bswap, Ty);
564 558
565 Value *Op = CI->getArgOperand(0); 559 Value *Op = CI->getArgOperand(0);
566 Op = CallInst::Create(Int, Op, CI->getName(), CI); 560 Op = CallInst::Create(Int, Op, CI->getName(), CI);
567 561
568 CI->replaceAllUsesWith(Op); 562 CI->replaceAllUsesWith(Op);
569 CI->eraseFromParent(); 563 CI->eraseFromParent();
570 return true; 564 return true;
571 } 565 }
OLDNEW
« no previous file with comments | « lib/CodeGen/AsmPrinter/DwarfDebug.cpp ('k') | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698