LLVM 24.0.0git
AVRShiftExpand.cpp File Reference

Expand non-8-bit and non-16-bit shift instructions (shl, lshr, ashr) to inline loops, just like avr-gcc. More...

#include "AVR.h"
#include "llvm/IR/Analysis.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/PassManager.h"

Go to the source code of this file.

Functions

 INITIALIZE_PASS (AVRShiftExpandLegacy, "avr-shift-expand", "AVR Shift Expansion", false, false) Pass *llvm
static void expandBinaryOperator (BinaryOperator *BI)
static bool expandShiftsInFunction (Function &F)

Detailed Description

Expand non-8-bit and non-16-bit shift instructions (shl, lshr, ashr) to inline loops, just like avr-gcc.

This must be done in IR because otherwise the type legalizer will turn 32-bit shifts into (non-existing) library calls such as __ashlsi3.

Definition in file AVRShiftExpand.cpp.

Function Documentation

◆ expandBinaryOperator()

◆ expandShiftsInFunction()

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( AVRShiftExpandLegacy ,
"avr-shift-expand" ,
"AVR Shift Expansion" ,
false ,
false  )

Definition at line 42 of file AVRShiftExpand.cpp.

References llvm::createAVRShiftExpandLegacyPass().